Re: Detecting a Null field on an NpgsqlDataReader object

From: "Francisco Figueiredo Jr(dot)" <francisco(at)npgsql(dot)org>
To: "Oliveiros d'Azevedo Cristina" <oliveiros(dot)cristina(at)marktest(dot)pt>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Detecting a Null field on an NpgsqlDataReader object
Date: 2010-08-05 14:01:08
Message-ID: AANLkTinQ_BPFRtX2PQ_ihLiJ-BKVn7uuV96BnR-tLi8+@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Tue, Aug 3, 2010 at 13:46, Oliveiros d'Azevedo Cristina
<oliveiros(dot)cristina(at)marktest(dot)pt> wrote:
> Olá!
>

Olá! Tudo bem?

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

If you need any help, please let us know.

>
>
> Obrigado,

De nada!

--
Regards,

Francisco Figueiredo Jr.
Npgsql Lead Developer
http://www.npgsql.org
http://fxjr.blogspot.com
http://twitter.com/franciscojunior

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bosco Rama 2010-08-05 22:17:28 Large object support in ecpg
Previous Message Oliveiros d'Azevedo Cristina 2010-08-03 16:46:54 Re: Detecting a Null field on an NpgsqlDataReader object