Hello all,
I am building a vb.net app, using mysql and corelabs connector.
I am having a bit of difficulty with a dbnull error. Here is some
sample code:
Do While myReader3.Read( )
txtFname.Text = myReader3("fnam e")
txtLname.Text = myReader3("lnam e")
txtMiddle.Text = myReader3("midd le")
txtAddress.Text = myReader3("addr ess")
txtAddress2.Tex t = myReader3("addr ess2")
txtCity.Text = myReader4("city code") <- Error starts here
txtState.Text = myReader4("stat e_code")
txtHphone.Text = myReader4("hpho ne")
txtWkphone.Text = myReader4("wkph one")
txtCell.Text = myReader4("cell phone")
Loop
The problem is, I get a dbnull error at "citycode". In order to pull
the rest of the data (there are 26 fields I am trying to extract), I
have to open a new connection, get the next 6 values, close, reopen
and get the next 6 values. NONE of the fields are null!
Does anyone have any idea why this would occur??? I am totally
stumped!
TIA,
Daniel
I am building a vb.net app, using mysql and corelabs connector.
I am having a bit of difficulty with a dbnull error. Here is some
sample code:
Do While myReader3.Read( )
txtFname.Text = myReader3("fnam e")
txtLname.Text = myReader3("lnam e")
txtMiddle.Text = myReader3("midd le")
txtAddress.Text = myReader3("addr ess")
txtAddress2.Tex t = myReader3("addr ess2")
txtCity.Text = myReader4("city code") <- Error starts here
txtState.Text = myReader4("stat e_code")
txtHphone.Text = myReader4("hpho ne")
txtWkphone.Text = myReader4("wkph one")
txtCell.Text = myReader4("cell phone")
Loop
The problem is, I get a dbnull error at "citycode". In order to pull
the rest of the data (there are 26 fields I am trying to extract), I
have to open a new connection, get the next 6 values, close, reopen
and get the next 6 values. NONE of the fields are null!
Does anyone have any idea why this would occur??? I am totally
stumped!
TIA,
Daniel
Comment