May 27, 2004 at 8:41 am
I have an Access Data Project linked to our production server (SERVEUR4 : Win 2k server/ SQL srv 2k). We recently bought a new server (SERVEUR5 : win 2k3 same SQL version). But once I relink the adp to the new server I get weird date problems. EX:
Select * from Horaire where DateDebut = '2004/05/17' (ymd)
returns a conversion error from nVarChar to DateTime
but if I change the date to '2004/17/05' (ydm), the query works just fine, but result set returns the date in this format
'2004/05/17' (ymd) which is the one that I am using in the software. I've read that "SET DATEFORMAT ydm" can solve the problem but it works only for a single session. I need a more permanent solution that will work on the whole server for all users... and without altering the program.
I've also read that this can be solved in the regional parameters. I've copied all the parameters from server4 to 5 but it still doesn't work (format is yyyy/mm/dd and language is French Canada).
May 27, 2004 at 9:09 am
Check your Windows 2003 server locale settings as it might have been set using a different locale from your other server. Also check the server collation type in SQL (right click on server, go to properties, shows up under the general tab).
May 27, 2004 at 9:44 am
I checked for the user who set the local setting and it's been set by the local admin. Collation type is the same on SERVEUR5 as SERVEUR4 (FRENCH_CI_AS)
Language is French (France)
Could setting another collation which has other default settings correct the problem?
May 27, 2004 at 10:07 am
Remi,
Does the Query that is causing the problem on the new server run ok on the old?
Regional settings, Locale and Collation (try checking the indiv. database(s)) as well.
Good Luck
Good Hunting!
AJ Ahrens
webmaster@kritter.net
May 27, 2004 at 10:39 am
Yes everything works fine on the old server. the problem occurs only when I try running the queries on the new server when they have dates after the 12th of the month.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply