﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Conversion from type 'DBNull' to type 'String' is not valid.</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sat, 02 May 2026 20:47:33 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost11613.aspx</link><description>Glad we helped out, even if it was indirectly.&amp;nbsp; That's the whole reason we went with forum based support, so that people could peruse the topics and get some of their questions answered without having to ask them :)</description><pubDate>Thu, 20 Sep 2007 08:53:25 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost596.aspx</link><description>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..&lt;BR&gt;&lt;BR&gt;PS - I dont have any null info on the "nome_clube" field on the table.&lt;/P&gt;&lt;P&gt;Any Clues.. anyone?</description><pubDate>Thu, 20 Sep 2007 08:53:25 GMT</pubDate><dc:creator>Ricardo Quartier</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost11604.aspx</link><description>I would like to thank Ricardo, Ben and Trent (I hope I did not miss anybody else in this thread) for this great thread.&amp;nbsp; &lt;/P&gt;&lt;P&gt;As a novice user of SF I am reviewing the previous posts, and then I found this one and by looking at the dedication of the SF developers to guide Ricardo to the correct path and even going the extra mile to provide detail code on how to accomplish Ricardo's request, confirmed that I made the right choice of becoming a member of the StrataFrame family.&lt;/P&gt;&lt;P&gt;I printed out this thread and was able to accomplish the same filtering of a data in a combo based on the selection of a previous combo and it worked the first time and without having to post a request for help.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Once again, thanks to the SF team!&lt;/EM&gt;</description><pubDate>Wed, 19 Sep 2007 14:24:37 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost753.aspx</link><description>Good, I'm glad you got it.&amp;nbsp; Let me know if you have any questions.</description><pubDate>Thu, 30 Mar 2006 15:29:31 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost752.aspx</link><description>it runs now, Im trying to learn.. thanks Trent</description><pubDate>Wed, 29 Mar 2006 17:14:49 GMT</pubDate><dc:creator>Ricardo Quartier</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost745.aspx</link><description>Got it...thanks.</description><pubDate>Mon, 27 Mar 2006 15:04:56 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost740.aspx</link><description>OK, I've sent to u... thanks</description><pubDate>Sun, 26 Mar 2006 17:54:19 GMT</pubDate><dc:creator>Ricardo Quartier</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost738.aspx</link><description>In the city combo box, how do you have the PopulationDataSourceSettings setup?&amp;nbsp; Ricardo, could you just ZIP up your Visual Studio solution and send it to me?&amp;nbsp; I can fix the problem and then send it back to you so you can see it and then you will know how to use it in the future.&amp;nbsp; Just send it to &lt;A href="mailto:support@strataframe.net"&gt;support@strataframe.net&lt;/A&gt; and I will keep my eye out for it. :)</description><pubDate>Sat, 25 Mar 2006 11:36:40 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost732.aspx</link><description>Hi, now runs.. but the combobox of cities does not load... :w00t:&lt;/P&gt;&lt;P&gt;Should i change other part of the code?</description><pubDate>Fri, 24 Mar 2006 20:30:17 GMT</pubDate><dc:creator>Ricardo Quartier</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost710.aspx</link><description>Ricardo,&lt;/P&gt;&lt;P&gt;Your fill method is wrong on the cities.&amp;nbsp; Try this instead:&lt;/P&gt;&lt;P&gt;Public Sub FillCityByState(ByVal StatePrimaryKey As Integer)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.FillDataTable("SELECT * FROM tb_cidade WHERE cidade_estado_id = " &amp;amp; StatePrimaryKey.ToString())&lt;/P&gt;&lt;P&gt;The code you had referenced its own property which was causing the error you described.&amp;nbsp; Try this and let me know how it goes. :cool:</description><pubDate>Thu, 23 Mar 2006 16:55:42 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost709.aspx</link><description>Thanks Rob that helped me to understand, but im still gettin' an error when i try to run... (so i must done something worng i guess)&lt;/P&gt;&lt;P&gt;This is what i done so far:&lt;/P&gt;&lt;P&gt;1 - On my cities BO, called (CidadesBO)&lt;BR&gt;&lt;BR&gt;Public Sub FillCityByState(ByVal StatePrimaryKey As Integer)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.FillDataTable("SELECT * FROM tb_cidade WHERE cidade_estado_id = " &amp;amp; EstadosBO.EstadosBOFieldNames.estado_id_cod.ToString())&lt;/P&gt;&lt;P&gt;'ESTADOSBO is the BO of states&lt;BR&gt;End Sub&lt;/P&gt;&lt;P&gt;2 - On the Clubs form, called (frmCadClubes)&lt;BR&gt;&lt;BR&gt;2.1 - City Combo&lt;BR&gt;&lt;BR&gt;Private Sub cboCidade_ListPopulating(ByVal e As MicroFour.StrataFrame.UI.ListPopulatingEventArgs) Handles cboCidade.ListPopulating&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.Parameters(0).Value = EstadosBO.EstadosBOFieldNames.estado_id_cod&lt;/P&gt;&lt;P&gt;'ESTADOSBO is the BO of states&lt;BR&gt;End Sub&lt;/P&gt;&lt;P&gt;2.2 - State Combo&lt;BR&gt;&lt;BR&gt;Private Sub cboEstado_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboEstado.SelectedValueChanged&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cboCidade.Requery()&lt;BR&gt;End Sub&lt;/P&gt;&lt;P&gt;3 - I set the the Initialization as you told me.&lt;/P&gt;&lt;P&gt;But when i run, the code stops on this "requery line" and gives this message:&lt;BR&gt;&lt;BR&gt;{"Invalid column name 'estado_id_cod'."} but this is the primary key of the table states, and that repeats on the field called "cidade_estado_id" on the cities table, so this is the link.&lt;/P&gt;&lt;P&gt;On the pic Im sending a diagram :w00t: maybe give some clue.&lt;/P&gt;&lt;P&gt;Please be patience :D</description><pubDate>Thu, 23 Mar 2006 14:44:50 GMT</pubDate><dc:creator>Ricardo Quartier</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost706.aspx</link><description>Rob is exactly right, I really don't have anything to add.&amp;nbsp; Let me know if you need more detail. ;)</description><pubDate>Thu, 23 Mar 2006 12:54:27 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost705.aspx</link><description>&lt;FONT face=Arial color=#111111&gt;&amp;nbsp;Hi Ricardo,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face=Arial color=#111111&gt;"MyStates" is used as an example, you will want to substitute that with the name of the StateBO in your code. The line,&amp;nbsp; &lt;/FONT&gt;&lt;FONT face=Arial color=#111111&gt;e.Parameters(0).Value = YourStateBO.State_PrimaryKey &lt;/FONT&gt;&lt;FONT face=Arial color=#111111&gt;is getting the current primary key from the State BO and assigning it to the query parameter.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face=Arial color=#111111&gt;Hope that helps,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face=Arial color=#111111&gt;Rob&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;B&gt;&lt;FONT color=#ff0000 size=2&gt;&lt;/P&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Thu, 23 Mar 2006 12:39:35 GMT</pubDate><dc:creator>Robert Linton</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost704.aspx</link><description>Yo Trent, this line:&lt;/P&gt;&lt;P&gt;&lt;FONT color=#1111ff&gt;e.Parameters(0).Value = MyStates.State_PrimaryKey&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#1111ff&gt;I inserted here: (note - &lt;/FONT&gt;&lt;FONT color=#000000&gt;cboCidade is my combo of cities)&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#1111ff&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;Private&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; cboCidade_ListPopulating(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; e &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; MicroFour.StrataFrame.UI.ListPopulatingEventArgs) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Handles&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; cboCidade.ListPopulating&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;e.Parameters(0).Value = MyStates.State_PrimaryKey&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;It keeps giving this error: (Name 'MyStates' is not declared.) &lt;B&gt;&lt;FONT color=#ff0000 size=2&gt;should it be one of my controls ? One of the comboboxes? CityBO?&lt;/P&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Thu, 23 Mar 2006 12:09:54 GMT</pubDate><dc:creator>Ricardo Quartier</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost696.aspx</link><description>Right now you are populating&amp;nbsp;each combo box using all rows in the respective table.&amp;nbsp; This will obviously not work very well for tables with a lot of records.&amp;nbsp; You only need to show the cities that belong to state when populating the cities combo, and then you need to only load the available states for the selected country.&lt;/P&gt;&lt;P&gt;I assume that your database knows these relationships.&amp;nbsp; I am going to talk about the city combo, but the same will apply to the states.&amp;nbsp; In your table, your city data structure should know the state to which it belongs.&amp;nbsp; So you would need to create a Fill method on the BO that looks something like this:&lt;/P&gt;&lt;P&gt;&lt;FONT color=#1111ff&gt;Public Sub FillCityByState(Byval StatePrimaryKey As Integer)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.FillDataTable("SELECT * FROM cities WHERE city_state = " &amp;amp; StatePrimaryKey.ToString())&lt;BR&gt;End Sub&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Next, you will want to change the PopulationDataSourceSettings of the city combo to use the above method.&amp;nbsp; The one thing that you need to is specify the parameter StatePrimaryKey when the combo loads.&amp;nbsp; To do this, capture the ListPopulating event on the city combo box.&amp;nbsp; Inside that event, place code similar to this:&lt;/P&gt;&lt;P&gt;&lt;FONT color=#1111ff&gt;e.Parameters(0).Value = MyStates.State_PrimaryKey&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Now you need to tell the city combo to reload when the state changes.&amp;nbsp; So in the SelectedValueChanged or the SelectedIndexChanged event of the State combo box, place the following code:&lt;/P&gt;&lt;P&gt;&lt;FONT color=#1111ff&gt;MyCityCombo.Requery()&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;This will force the cities to repopulate based on the new state selection.&lt;/P&gt;&lt;P&gt;Once last thing you can do to make sure that the object populate in the correct order since they rely on one another, is set the InitializationPriority.&amp;nbsp; This will ensure that order they are loaded when instantiating the form will happen in the proper order.&amp;nbsp; Place a value like this on each combo:&lt;/P&gt;&lt;P&gt;Country Combo Initialization Priority: 25&lt;BR&gt;State&amp;nbsp;Combo Initialization Priority: 26&lt;BR&gt;City&amp;nbsp;Combo Initialization Priority: 27&lt;/P&gt;&lt;P&gt;Let me know if you have any questions.</description><pubDate>Wed, 22 Mar 2006 17:44:32 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost695.aspx</link><description>Yo, last "question" and a diferent help :D&lt;/P&gt;&lt;P&gt;Now I have those 3 combos, like i said before, the thing is that they are not really "very" dependent. So this way I can chooseto set a club on any country (this is allright) but then when i drop down the states, it shows the states of all countries, anyway, this one is agressive, when i drop down the cities, it show thousands of cities from all around the world. :w00t:&lt;/P&gt;&lt;P&gt;My database is kind simple (4 tables right now)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Clubs&lt;BR&gt;&lt;/STRONG&gt;-------&lt;BR&gt;clubId&lt;BR&gt;countryId&lt;BR&gt;stateId&lt;BR&gt;cityId&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Contries&lt;BR&gt;&lt;/STRONG&gt;--------&lt;BR&gt;countryId&lt;BR&gt;description&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;State&lt;BR&gt;&lt;/STRONG&gt;-------&lt;BR&gt;stateId&lt;BR&gt;description&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Cities&lt;/STRONG&gt;&lt;BR&gt;-------&lt;BR&gt;cityId&lt;BR&gt;description&lt;/P&gt;&lt;P&gt;Is there any way of strataframe to handle this, "make then dependent"? I use to do this on aspx pages.. using a comand on a query, that concatenate the sql and the value of the parent combo, like:&lt;BR&gt;&lt;BR&gt;"select * from states where country = ' &amp;amp; cboCountries.selectedvalue = 25 &amp;amp; '"&lt;/P&gt;&lt;P&gt;Something like that... then i put the code on the event change of the combo and on the form load to bring right the first record.&lt;/P&gt;&lt;P&gt;Any great clues? a "how to" will be great, i won't lie (if that does not take so much time from u).&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ricardo</description><pubDate>Wed, 22 Mar 2006 15:44:21 GMT</pubDate><dc:creator>Ricardo Quartier</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost692.aspx</link><description>Glad to hear it ;)</description><pubDate>Wed, 22 Mar 2006 08:22:20 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost691.aspx</link><description>Yo Trent, all okidoki. Thanks&lt;/P&gt;&lt;P&gt;Now i have 3 combos... Contry, State and City</description><pubDate>Wed, 22 Mar 2006 00:02:17 GMT</pubDate><dc:creator>Ricardo Quartier</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost663.aspx</link><description>Ricardo,&lt;P&gt;This will work&amp;nbsp;similar as the example I showed you previously.&amp;nbsp; Follow the steps below:&lt;/P&gt;&lt;P&gt;1. Select the country combo box&lt;BR&gt;2. Click the PopulationDataSourceSettings&lt;BR&gt;3. Choose the Country Business Object&lt;BR&gt;4. Choose the method that will Fill the BO with the countries&lt;BR&gt;5. Add the country name as the display column&lt;BR&gt;6. Add {0} to the format column&lt;BR&gt;7. Pick the primary key of the Country table for the Value Member&lt;BR&gt;8. Click OK&lt;BR&gt;9. Make sure that the PopulationType of the combo is set to BusinessObject&lt;BR&gt;10. On the same combo box, select the BusinessObject property to the instance of the Clubes on the form&lt;BR&gt;11. Set the BindingField to the Country field in the Clubes table.&lt;BR&gt;&lt;BR&gt;That should be it.&amp;nbsp; Let me know if you have any questions.</description><pubDate>Mon, 20 Mar 2006 10:34:30 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost659.aspx</link><description>&lt;SPAN id=_ctl1__ctl0_ctlTopic__ctl0_ctlPanelBar_ctlTopicsRepeater__ctl9_lblFullMessage&gt;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&amp;nbsp;countries table.. &amp;nbsp;i guess&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So, u got it...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks ....&lt;/SPAN&gt;</description><pubDate>Fri, 17 Mar 2006 17:58:48 GMT</pubDate><dc:creator>Ricardo Quartier</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost641.aspx</link><description>Just to verify what you are attempting to do before I send you some code.&amp;nbsp; You have a combo box that you want to populate with the countries which is bound to a field in the clubs table, correct?&amp;nbsp; But when you bind and navigate right now it is showing a number (i.e. Primary Key or something) rather than the country description.&amp;nbsp; Also, I assume that your country database has a primary key and that primary key is tied to the clubs country field, correct?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Country Table&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Club Table&lt;BR&gt;&lt;/STRONG&gt;Primary Key - Integer&amp;nbsp;&amp;nbsp;----- ClubCountry - Integer&lt;BR&gt;Description - String&lt;/P&gt;&lt;P&gt;The simple table above is just to verify that I understand your data structure and what you are attempting to do.&amp;nbsp; Please advise and let me know if I understand your situation.&amp;nbsp; Thanks.</description><pubDate>Wed, 15 Mar 2006 10:05:05 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost640.aspx</link><description>Hi, Trent... me again.. now I can load comboboxes on all forms.. that makes me very happy... but can u please teach me how to save the data from a diferent table to the first?&lt;/P&gt;&lt;P&gt;Example: I have a form 1 to insert data from Clubs (soccer), then i load all the textboxes, from the table called (tb_clube), to insert, edit.. and been filled by a BO called "clubeBO", all&amp;nbsp;okidoki like the example you guys made on the tutorial.&lt;/P&gt;&lt;P&gt;Then I inserted a new BO called "paisBO" (means country), and made the same fill method. If i put a combobox to load like u teach me, it brings all the countries... But the thing is that I want to insert on the clubs form this countries comboBox, to load the data from the coutries table and insert the value field (a&amp;nbsp;primary key called pais_id_cod) on the country field on the clubs table.. and somehow, when i navigate the records, see the country that belongs to that team... instead of the value.... like 1, 2, 3....&lt;/P&gt;&lt;P&gt;Am I been anoying? :D, not sure if it's even possible... but i guess it is... not sure how with strataframe... either...&lt;/P&gt;&lt;P&gt;If u got time, and nothing better to it... please drop a few lines.. (of code too) :cool:&lt;/P&gt;&lt;P&gt;Best Regards...&lt;/P&gt;&lt;P&gt;Ricardo</description><pubDate>Tue, 14 Mar 2006 20:58:05 GMT</pubDate><dc:creator>Ricardo Quartier</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost628.aspx</link><description>Glad to help ;)</description><pubDate>Mon, 13 Mar 2006 12:44:33 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost624.aspx</link><description>Awesome ! Thanks, Trent !</description><pubDate>Mon, 13 Mar 2006 01:15:56 GMT</pubDate><dc:creator>Ricardo Quartier</dc:creator></item><item><title>RE: Conversion from type 'DBNull' to type 'String' is not valid.</title><link>http://forum.strataframe.net/FindPost613.aspx</link><description>Ricardo,&lt;/P&gt;&lt;P&gt;Since you are trying to popualte a combo from a business object, you should use the PopulateionDataSourceSettinngs on the combo box itself.&amp;nbsp; Also you will need to change the population method from manual to BusinessObject on the combo box also.&amp;nbsp; The code sample you showed above is actually not going to work for two reasons.&amp;nbsp; First, you are populating the business object twice.&amp;nbsp; Once in the ParentFormLoading of the combo box and again in the load of the business object itself.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Secondly, the reason you are still getting the error is because the DataSource, DisplayMember, and ValueMember of the combo box were never set which tells the combo how to populate and interact with the bound data.&amp;nbsp; So you need to do one of two things:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Manual Population&lt;BR&gt;&lt;/STRONG&gt;1. Remove the Me.ClubesBO1.FillTop100() from the ParentFormLoading event of the business object itself.&amp;nbsp; Leave the other in the combo boxes ParentFormLoading.&lt;BR&gt;2. Make the combo box ParentFormLoading event look like this:&lt;/P&gt;&lt;P&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; ComboBox1_ParentFormLoading() &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Handles&lt;/FONT&gt;&lt;FONT size=2&gt; ComboBox1.ParentFormLoading&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.ClubesBO1.FillTop100()&lt;BR&gt;&lt;BR&gt;&lt;FONT style="BACKGROUND-COLOR: #ffff11"&gt;'-- Set the display member&lt;BR&gt;Me.ComboBox1.DisplayMember = "[MyDisplayFieldName]"&lt;BR&gt;Me.ComboBox1.ValueMember = "[MyValueMemberField - Usually a Primary Key Field]"&lt;BR&gt;Me.ComboBox1.DataSource = Me.ClubesBO1.CurrentDataTable&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;P&gt;End&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Class&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;Replace the display and value member fields with the names of the fields you wish to use.&lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;Better Solution - PopulationDataSourceSettings&lt;BR&gt;&lt;/STRONG&gt;1. Remove all of calls to ClubesBO1.FillTop100 from all methods.&lt;BR&gt;2. Through the form designer, navigate to the combo box.&lt;BR&gt;3. In the property sheet, navigate to the PopulationDataSourceSettings&lt;BR&gt;4. Click the "..." button to the right of the value&lt;BR&gt;5. When the editor appears, set the Business Object Type to "ClubesBO"&lt;BR&gt;6. Set the Method to Execute to "FillTop100()"&lt;BR&gt;7. Add the fields that you wish to have displayed in the combo box at the bottom left of the editor&lt;BR&gt;8. To tell the combo box how to use those selected display fields, set the Display Member Format String.&amp;nbsp; For example, if you only added a single display member field, the format string will look like this: {0}&lt;BR&gt;9. Pick the value Member field.&amp;nbsp; This is the fields that will be bound to the data.&lt;BR&gt;10. Click OK.&lt;BR&gt;11. Set the PopulationType property on the combo box to Business Object.&lt;BR&gt;12. Save your changes and run the form.&amp;nbsp; This should get you going. ;) &lt;/P&gt;&lt;P&gt;Let me know if you have any questions.</description><pubDate>Fri, 10 Mar 2006 17:42:27 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>