If IsDBNull(SqlDataReader("Manufacturer")) Then
txtModel.Text = "N/A"
Else
txtModel.Text = SqlDataReader("Manufacturer")
End If
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
======================================
"Randy Galliano" <ra************@thegallianos.comwrote in message news:%2****************@TK2MSFTNGP02.phx.gbl...
Hello,
I am reading some records into a recordset when I got to assign a text box the value of one of the fields I get an
exception because the recordset has a null value in it. How do you test for nulls in vb script?
Example:
txtModel.Text = SqlDataReader("Manufacturer") ' Manufacturer is null.
Regards,
Randy.