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
Master Mind
NA
1
5.3k
DBNull Value type casting
Feb 1 2011 9:48 AM
Hi
Can anyone help me in finiding the solution for the DBHull value type casting.
Infact I am storing values into the database and retrieving them into the datagrid. when there is null value in the database it gives me an error " System.InvalidCastException: Object cannot be cast from DBNull to other types. at System.DBNull.System.IConvertible.ToDateTime(IFormatProvider provider) at System.Convert.ToDateTime(Object value)".
Any idea how to manage it while I would like to mention that while adding the parameters into the database I am using ("Parameter", DBNull.Value).
Many Thanks.
Reply
Answers (
3
)
Send email ( ASP.NET with VB Language)
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.