How do one test for nulls in VB?

  • Thread starter Thread starter Randy Galliano
  • Start date Start date
R

Randy Galliano

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.
 
Randy said:
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.


Let me clarify one more thing. I am using .net 2.0 with vb script.
According to the manual on MSDN isNull is a function I can use, but
Visual Studio is saying the function is not defined.

Regards,

Randy.
 
Randy Galliano said:
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.
 
Back
Top