We are adding French support to an older VB6 app.
The original developer used a mix of date formats when writing to the database, but SQL didn't seem to mind as it was all in English. (March 31, 2009 or 2009-03-31 etc...)
When you try running the app on a French machine, you get:
[-2147217913][Microsoft][ODBC SQL Server Driver][SQL Server]Syntax error converting character string to smalldatetime datatype.
I believe the problem is the SQL looks like set xxxx='31-mars-2009' and the SQL Server we have can understand english but not french.
The original fix was to use Format(string,"short date") which seemed to fix it, but I don't think that's fixing it 100% of the time. (Note: I think short date works correctly, there was a text box that had to be converted to a string.)
I played around with SET LANGUAGE and that didn't seem to help (but I may not know what I'm doing.)
I believe the "most correct" solution is to format all dates numeric using YYYYMMDD. Is that correct?
(the app will never need to be ported to any other languages, just English and French.)