By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,430 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

how to handle null values

P: n/a
how should i hanle null values returned by the datareader
i am using OleDbDataReader for accessing access database.

Oct 17 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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" <pa***********@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
how should i hanle null values returned by the datareader
i am using OleDbDataReader for accessing access database.

Oct 17 '06 #2

P: n/a
use IsDBNull.value
Patrick

"psycho" <pa***********@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
how should i hanle null values returned by the datareader
i am using OleDbDataReader for accessing access database.

Oct 17 '06 #3

P: n/a
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" <pa***********@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
how should i hanle null values returned by the datareader
i am using OleDbDataReader for accessing access database.

Oct 17 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.