|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, February 22, 2013 11:14 AM
Points: 39,
Visits: 141
|
|
I receive this error when inserting in the database. I know my dates are good. SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
any ideas please. i know just about all of you know me from bugging all. I really do thank you for your help, comments, and examples.
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: 2 days ago @ 2:11 AM
Points: 9,378,
Visits: 6,473
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 10:44 PM
Points: 1,143,
Visits: 229
|
|
| This is bacause u have taken field as DateTime, u should try DateTime2 insted.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 10:44 PM
Points: 1,143,
Visits: 229
|
|
DateTime Range : January 1, 1753, through December 31, 9999
DateTime2 Range : 0001-01-01 through 9999-12-31 January 1,1 AD through December 31, 9999 AD
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, February 22, 2013 11:14 AM
Points: 39,
Visits: 141
|
|
Changing to datetime2 did not work. any other ideas? thanks
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Yesterday @ 2:18 PM
Points: 4,434,
Visits: 7,219
|
|
What application are you using to do the inserts? What happens if you run the same insert statements from Management Studio?
John
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 1:55 PM
Points: 15,442,
Visits: 9,571
|
|
That's always from either an out-of-range date or a malformed date.
Usually see it where American-style dates (MM-DD-YYYY) are being inserted into something expecting Euro-style dates (DD-MM-YYYY), or vice-versa. Tries to put "day 15" into "month", and errors out.
Test for that kind of thing in your data. That's the most common cause I've run into.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Friday, February 22, 2013 11:14 AM
Points: 39,
Visits: 141
|
|
I am using vb.net 2010 pro. I am new at this. Maybe i need to do a conversion or somthing in vb. Which I do not know how to do.
thanks
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 1:55 PM
Points: 15,442,
Visits: 9,571
|
|
Definitely could be an issue with in-flight data conversions of one sort or another.
You'll probably need to get a more experienced .NET dev to review your code.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 10:44 PM
Points: 1,143,
Visits: 229
|
|
| U should keep format of 'YYYY-MM-DD' while insert from VS..
|
|
|
|