I'm moving a classic store from the Win2003 IIS6 server to some Win2008 IIS7 server, moved everything across including database. The front-end appears to operate all right, however when I login it needs to do pull in data according to date ranges and today from no where I get this error?
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value
Any ideas why this could do that around the new server and This is not on that old one? No code has transformed and also the DB is really a backup from the one in the old server??
Ah, I'd if you have a culture problem. Most likely you'll need / watch for date and string formats inside a specific form, and also the coding in the present process differs ) YOu most likely adid adjust the culture within the old server, and did this is not on the brand new one.
In the error message, what is most likely happening here would be that the ASP application is delivering date strings to SQL server, e.g. it's building queries with Where clauses such as this:
WHERE SomeDateField > '20/04/2010'
... plus some different regional configurations around the new platform are stopping SQL from parsing the date-string. Usually, this comes lower towards the US versus United kingdom date format factor of putting the month inside a different place. Either:
- The regional configurations in Home windows will vary, leading to ASP to construct the date-string in different ways, or
- The regional configurations in SQL will vary, leading to SQL to try to parse the date-string in different ways.
In the conversation we'd below, it appears like it may be the regional configurations in SQL.
In SQL Server Standard, you will find usually the following language configurations that may affect how date-strings are parsed:
- A general Language setting for that Server
- A language setting for every Login defined around the server (consider the Qualities dialog for that login)
I am confident SQL Express can also get exactly the same configurations. Turn on "Microsoft SQL Server Management Studio Express" on servers and compare the Server and Login language configurations.