Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how to handle null values

Reply
Thread Tools

how to handle null values

 
 
psycho
Guest
Posts: n/a
 
      10-17-2006
how should i hanle null values returned by the datareader
i am using OleDbDataReader for accessing access database.

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      10-17-2006
Typically you would first check if the value is null with IsDbNull method.
If it is not, you can get the value with one of the GetXxx methods

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


"psycho" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> how should i hanle null values returned by the datareader
> i am using OleDbDataReader for accessing access database.
>



 
Reply With Quote
 
 
 
 
Patrick.O.Ige
Guest
Posts: n/a
 
      10-17-2006
use IsDBNull.value
Patrick

"psycho" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> how should i hanle null values returned by the datareader
> i am using OleDbDataReader for accessing access database.
>



 
Reply With Quote
 
Karl Seguin [MVP]
Guest
Posts: n/a
 
      10-17-2006
There's a SafeDataReader in the CSLA.NET which takes care of this for you.

Here's the VB.NET version:
http://www.lhotka.net/Article.aspx?i...3-8b5bda6bad22

there's a C# one somewhere on the site...

Karl

--
http://www.openmymind.net/
http://www.codebetter.com/


"psycho" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> how should i hanle null values returned by the datareader
> i am using OleDbDataReader for accessing access database.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to handle null values in DataBinder.Eval() =?Utf-8?B?ZWRkeSBkZSBib2Vy?= ASP .Net 12 10-23-2009 06:56 AM
"stringObj == null" vs "stringObj.equals(null)", for null check?? qazmlp1209@rediffmail.com Java 5 03-29-2006 10:37 PM
Possible to handle web requests without an ASPX page? i.e. have DLL handle request. jdlwright@shaw.ca ASP .Net 2 05-31-2005 05:42 PM
File Handle Reading Blues: Rereading a File Handle for Input Dietrich Perl 1 07-22-2004 10:02 AM



Advertisments