TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dealy
NA
213
0
Error message: "Data is null.This method or property cannot be called on Null Values."
Oct 7 2009 8:41 AM
Hello,
I have the following code:
String name;
if (rdr.GetString(rdr.GetOrdinal("NAME")) == null)
name = "";
else
name = rdr.GetString(rdr.GetOrdinal("NAME"));
and i'm getting an error message "Data is null.This method or property cannot be called on Null Values."
Any ideas why i'm getting this error message?
Thank you in advance.
Reply
Answers (
4
)
Automatic click over a button in a web page
How do i set colors for rows in a dataGridView control?