pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliveiros d'Azevedo Cristina <oliveiros.cristina@marktest.pt>
To: pgsql-interfaces@postgresql.org
Subject: Detecting a Null field on an NpgsqlDataReader object
Date: Tue, 3 Aug 2010 16:25:57 +0100
Message-ID: <1BBEE93EA22B44CF870E6F37B350FF59@marktestcr.marktest.pt> (raw)

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?

Thanks a million for your help

Best,
Oliveiros d'Azevedo Cristina

view thread (4+ messages)  latest in thread

Message-ID: <1BBEE93EA22B44CF870E6F37B350FF59@marktestcr.marktest.pt>
Permalink:  ../1BBEE93EA22B44CF870E6F37B350FF59@marktestcr.marktest.pt/
Also on:    postgresql.org/message-id/1BBEE93EA22B44CF870E6F37B350FF59@marktestcr.marktest.pt

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: oliveiros.cristina@marktest.pt
  Subject: Re: Detecting a Null field on an NpgsqlDataReader object
  In-Reply-To: <1BBEE93EA22B44CF870E6F37B350FF59@marktestcr.marktest.pt>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox