Conversion from type 'DBNull' to type 'String' is not valid.


Author
Message
Ricardo Quartier
Ricardo Quartier
StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)
Group: Forum Members
Posts: 87, Visits: 779
Hello.. this is what I am doing now... Im trying to pupulate the combo box, but i'm gettin this error "Conversion from type 'DBNull' to type 'String' is not valid.". The funny thing is that I have a a text box that loads from the same BO and loads the same field, and it's working..

PS - I dont have any null info on the "nome_clube" field on the table.

Any Clues.. anyone?

Attachments
combobox_properties.gif (331 views, 77.00 KB)
dbnull_error.gif (334 views, 62.00 KB)
sql_data.gif (303 views, 63.00 KB)
textbox_properties.gif (328 views, 76.00 KB)
Replies
Ricardo Quartier
Ricardo Quartier
StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)
Group: Forum Members
Posts: 87, Visits: 779
Hi everything u said was correct, but i still did not inserted the clubs combobox in the clubs form, but.. it was going to show the number of the country (PK) coming from the countries table..  i guess

So, u got it...

Thanks ....

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Ricardo,

This will work similar as the example I showed you previously.  Follow the steps below:

1. Select the country combo box
2. Click the PopulationDataSourceSettings
3. Choose the Country Business Object
4. Choose the method that will Fill the BO with the countries
5. Add the country name as the display column
6. Add {0} to the format column
7. Pick the primary key of the Country table for the Value Member
8. Click OK
9. Make sure that the PopulationType of the combo is set to BusinessObject
10. On the same combo box, select the BusinessObject property to the instance of the Clubes on the form
11. Set the BindingField to the Country field in the Clubes table.

That should be it.  Let me know if you have any questions.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Ricardo Quartier - 20 Years Ago
Ricardo Quartier - 20 Years Ago
StrataFrame Team - 20 Years Ago
Ricardo Quartier - 20 Years Ago
Trent L. Taylor - 20 Years Ago
Ricardo Quartier - 20 Years Ago
             Glad to help ;)
Trent L. Taylor - 20 Years Ago
Ricardo Quartier - 20 Years Ago
Trent L. Taylor - 20 Years Ago
Ricardo Quartier - 20 Years Ago
Trent L. Taylor - 20 Years Ago
Ricardo Quartier - 20 Years Ago
             Glad to hear it ;)
Trent L. Taylor - 20 Years Ago
Ricardo Quartier - 20 Years Ago
Trent L. Taylor - 20 Years Ago
Ricardo Quartier - 20 Years Ago
Robert Linton - 20 Years Ago
Trent L. Taylor - 20 Years Ago
Ricardo Quartier - 20 Years Ago
Trent L. Taylor - 20 Years Ago
Ricardo Quartier - 20 Years Ago
Trent L. Taylor - 20 Years Ago
Ricardo Quartier - 20 Years Ago
             Got it...thanks.
Trent L. Taylor - 20 Years Ago
Ricardo Quartier - 20 Years Ago
Trent L. Taylor - 20 Years Ago
Edhy Rijo - 19 Years Ago
StrataFrame Team - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search