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 (346 views, 77.00 KB)
dbnull_error.gif (370 views, 62.00 KB)
sql_data.gif (326 views, 63.00 KB)
textbox_properties.gif (343 views, 76.00 KB)
Reply
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
Just to verify what you are attempting to do before I send you some code.  You have a combo box that you want to populate with the countries which is bound to a field in the clubs table, correct?  But when you bind and navigate right now it is showing a number (i.e. Primary Key or something) rather than the country description.  Also, I assume that your country database has a primary key and that primary key is tied to the clubs country field, correct?

Country Table                      Club Table
Primary Key - Integer  ----- ClubCountry - Integer
Description - String

The simple table above is just to verify that I understand your data structure and what you are attempting to do.  Please advise and let me know if I understand your situation.  Thanks.

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