W
wink martindale
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("fname")
txtLname.Text = myReader3("lname")
txtMiddle.Text = myReader3("middle")
txtAddress.Text = myReader3("address")
txtAddress2.Text = myReader3("address2")
txtCity.Text = myReader4("citycode") <- Error starts here
txtState.Text = myReader4("state_code")
txtHphone.Text = myReader4("hphone")
txtWkphone.Text = myReader4("wkphone")
txtCell.Text = myReader4("cellphone")
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("fname")
txtLname.Text = myReader3("lname")
txtMiddle.Text = myReader3("middle")
txtAddress.Text = myReader3("address")
txtAddress2.Text = myReader3("address2")
txtCity.Text = myReader4("citycode") <- Error starts here
txtState.Text = myReader4("state_code")
txtHphone.Text = myReader4("hphone")
txtWkphone.Text = myReader4("wkphone")
txtCell.Text = myReader4("cellphone")
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