Re: Detecting a Null field on an NpgsqlDataReader object

From: "Oliveiros d'Azevedo Cristina" <oliveiros(dot)cristina(at)marktest(dot)pt>
To: <francisco(at)npgsql(dot)org>
Cc: <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Detecting a Null field on an NpgsqlDataReader object
Date: 2010-08-03 16:46:54
Message-ID: 7C2FED61BE684CDD8CBAA745D6B37F24@marktestcr.marktest.pt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Olá!

>> 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.
>
>

Oh, I see.
All in all it's the same mechanism .
Yes, I'm indeed trying to check in a NpgsqlDataReader.
I'll give that method a try.

Obrigado,
Oliveiros

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Francisco Figueiredo Jr. 2010-08-05 14:01:08 Re: Detecting a Null field on an NpgsqlDataReader object
Previous Message Francisco Figueiredo Jr. 2010-08-03 16:32:01 Re: Detecting a Null field on an NpgsqlDataReader object