AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 How can i remove this error
Posted by Pramod Kumar Sharma on  5/24/2011 5:37:32 AM Category: C#
Add to my favorites
Email to friend
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

Post Your Reply Post New Question

 Viewer's Reply
ANSWER: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM
Answered By Moderator1 on 5/31/2011 10:41:17 AM
You have to set the culture info before inserting into database. follow the code below

CultureInfo ci = Thread.CurrentThread.CurrentCulture;
DateTime yourdatetime = Convert.ToDateTime(DropDownList1.SelectedValue, ci);

Then insert 'mydatetime' yourdatetime value to the database table.
 
SqlDateTime overflow.
Answered By Vikas Shukla on 10/7/2011 4:19:06 AM
this error comes bcoz we are not suppling any value to d parameter
so.. pass some valid values to the datetime parameter into the database
try this


hope this help u..
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
The Art & Science of JavaScript - Free 100 Page Preview!
Windows 8: 50 Questions and Answers You Need to Make a Decision (Normally $9.95)
Introduction to Web Applications Development