Board index » delphi » datetime trouble with BDE 5.01 and MS-SQL6.5

datetime trouble with BDE 5.01 and MS-SQL6.5

Hello

I have an interesting error and would like to know if there is a bug in
my configuration or if it's a known problem.

I'm working in a swiss german (NT) environment that's why I use a
ShortDateFormat = 'dd/mm/yyyy'. The BDE converts it to the format
'mm/dd/yyyy' before sending it to the (us-english) MS-SQL server 6.5.

Entering a date lower/equal '30.11.1999' in a TDateTimeField works fine.
Entering a date greater/equal '01.12.1999' raises an EDBEngineError
saying 'Syntax error converting DATETIME from character string'. I have
the same results testing with my application or with the SQL-Explorer
both on BDE!
Trouble is, when I do the same tests based on an ODBC-connection with
SQL-Explorer or an application, every thing works fine.

Sending an update statement like:

update TABLEX
 set DATETIMEFIELDY = '12/13/1999'

directly to the server from SQL-Explorer or ISQL works correctly.

Thanks for your help.

I'm getting frustrated to solve such problems instead of programing.

Urs Fiore.

 

Re:datetime trouble with BDE 5.01 and MS-SQL6.5


In article <37278A5E.10EF0...@powersoft.ch>,
  Urs Fiore <u.fi...@powersoft.ch> wrote:

Quote
> Hello

> I have an interesting error and would like to know if there is a bug in
> my configuration or if it's a known problem.

> I'm working in a swiss german (NT) environment that's why I use a
> ShortDateFormat = 'dd/mm/yyyy'. The BDE converts it to the format
> 'mm/dd/yyyy' before sending it to the (us-english) MS-SQL server 6.5.

> Entering a date lower/equal '30.11.1999' in a TDateTimeField works fine.
> Entering a date greater/equal '01.12.1999' raises an EDBEngineError
> saying 'Syntax error converting DATETIME from character string'. I have
> the same results testing with my application or with the SQL-Explorer
> both on BDE!
> Trouble is, when I do the same tests based on an ODBC-connection with
> SQL-Explorer or an application, every thing works fine.

> Sending an update statement like:

> update TABLEX
>  set DATETIMEFIELDY = '12/13/1999'

> directly to the server from SQL-Explorer or ISQL works correctly.

> Thanks for your help.

> I'm getting frustrated to solve such problems instead of programing.

> Urs Fiore.

Urs,

Go to the control panel and start 'SQL Server client configuration'
uncheck 'Use international settings'

This should do the trick.

Michel

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

Re:datetime trouble with BDE 5.01 and MS-SQL6.5


Re:datetime trouble with BDE 5.01 and MS-SQL6.5


Greetings, Urs

Other Threads