cancel
Showing results for 
Search instead for 
Did you mean: 

Check for NULL value (Recordset field)

Former Member
0 Kudos

Hi y'all...

A little question, so just for the weekend...

I've a query that returns 4 fields, the fisrt three always containing data, and the last one an integer, or NULL. If I get the value with <i>rs.Fields.Item(3).Value.ToString();</i> it always contains an integer. The NULL values are always converted to '0'.

How can I check if it is a NULL value?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Okey, found a workaround, using the SQL function ISNULL()...

SELECT ISNULL(U_MyVar, 'null_value') FROM [@MyTable]

Now I can check if the value has the value <i>"null_value"</i>. If so, that field was <i>null</i>