On Tue, Aug 3, 2010 at 12:25, Oliveiros d'Azevedo Cristina
> Dear All,
> How can I detect if a certain field of a record returned by a query is NULL
> I'm sure there must be a direct way of doing this, but I googled up and
> down, back and forth and was unable to find out.
> For ex, in Sql Server we just compare with DbNull singleton.
> What is the equivalent in Npgsql?
You can use the same way. Npgsql uses DBNull singleton to express null values.
If you are trying to check in the NpgsqlDataReader, you will need to
use the method IsDBNull(int)
I hope it helps.
Francisco Figueiredo Jr.
Npgsql Lead Developer
In response to
pgsql-interfaces by date
|Next:||From: Oliveiros d'Azevedo Cristina||Date: 2010-08-03 16:46:54|
|Subject: Re: Detecting a Null field on an NpgsqlDataReader object|
|Previous:||From: Oliveiros d'Azevedo Cristina||Date: 2010-08-03 15:25:57|
|Subject: Detecting a Null field on an NpgsqlDataReader object|