I have a page working with not problem since 3 years, and now that we've moved our database from a SQL Server 2000 to SQL Server 7 and i receive this error everywhere a date is used.
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
The error append on this line "While myReader.Read()" .. what can i do to solve this problem ?
Thank you
This may be caused by date format that differs from the SQL2000 instance to SQL7.0 instance. Try to change the DATEFORMAT option like this (can be set to mdy,ydm,and ymd) and test again:
SET DATEFORMAT mdy
GO
You can take a look at this link about converting to datetime type:
http://msdn.microsoft.com/library/en-us/acdata/ac_8_con_03_27c5.asp?frame=true
sql
No comments:
Post a Comment