Hi,
I have the following problem:
I’m developing with Visual Studio 2008, C# in an English environment.
I’m connecting to MS SQL Server 2008 and using the server Management Studio also in English.
I am working on a joint project which has been written with the same software but in a German environment!
The problem I have is when accessing the database I get the following error:
‘The conversion of a varchar data to a datetime data type results in an out-of-range value’
This does work within the German environment.
The problem is with the Dateformat when writing to the database. It can be made to work by adding the following statement at the start of the INSERT query: ‘set dateformat dmy;’.
Visual Studio uses the following dateTime definition:
‘public DateTime(int year, int month, int day, int hour, int minute, int second);’
My question is, is there a setting either in Visual studio or on the database that deals with the dateformats so that I do not have to change the code? If I change the code so it will run on my machine will it run on the other (German) machine?
Thankyou
c-code_it