.NET Framework - value NOTHING can appear in the Object() array filled by the OleDBDataReader ?

Asked By pamela fluente on 11-Jul-07 05:06 AM
I am using an OledbDataReader to read each record into an array of
objects, as usual.


My question is:

is it ever possible that one of the values contained in the array be
Nothing.

I have never seen it happen and I would believe it is impossible.

Can anyone confirm that ? And in case what is the reason ?


-P




Frans Bouma [C# MVP] replied on 12-Jul-07 04:22 AM
It's my understanding that it can't happen, NULL values are always
specified as DBNull.Value.

In general, use the native ADO.NET providers instead of oledb to be
sure.

FB

--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
pamela fluente replied on 12-Jul-07 02:15 PM
On 12 Lug, 10:22, "Frans Bouma [C# MVP]"


Thanks Frans,

I wanted to make sure that programmatically I only need to check for
dbNull values.

So far I have never neen a Nothing value. But perhaps did not try
hard enough.

I was wondering if perhaps it is actually impossible for some
technical reason (OleDB implementation).

I do have seen however an "Object" type (which is somehow curious).
So I was wondering whether it could also
spit a Nothing value.

BTW I am considering OleDb (and only that) because I am doing a
cross work among many different platforms.

-P