Board index » delphi » SQL Links for MS SQL 6.5 - Can't use dates

SQL Links for MS SQL 6.5 - Can't use dates

Hi,
Please anyone that used dates in this configuration (MS SQL 6.5 - SP3 +
hotfix 4 or whatever it's called), Delphi 3.01 C/S and SQL Links (4.51)
Each time I try to store a date, the BDE converts it to "dd mmmm yyyy"
format, and SQL cannot accept it (found this in SQL Trace). I cannot make
BDE to just send the date in plain dd/mm/yyyy format. Changing the
"dateFormat" parameter in BDEAdmin does not change anything.
Any idea ?

 

Re:SQL Links for MS SQL 6.5 - Can't use dates


If you insert the date With A query You can Try Something Like That

TxtSql := ' Insert into Mytable  (MyDate) values( "' + FormatDateTime('The
required format ') +'")'
You ca do the same With a update.

Query.sql.add( txtsql)

--
BC
Media Informatique Service

Albert Ivanov a crit dans le message <6imibo$sq...@forums.borland.com>...

Quote
>Hi,
>Please anyone that used dates in this configuration (MS SQL 6.5 - SP3 +
>hotfix 4 or whatever it's called), Delphi 3.01 C/S and SQL Links (4.51)
>Each time I try to store a date, the BDE converts it to "dd mmmm yyyy"
>format, and SQL cannot accept it (found this in SQL Trace). I cannot make
>BDE to just send the date in plain dd/mm/yyyy format. Changing the
>"dateFormat" parameter in BDEAdmin does not change anything.
>Any idea ?

Re:SQL Links for MS SQL 6.5 - Can't use dates


The BDE convert your date with your local format (see windows parameters)
But, you have this problem only with AsString function.
With MSSQL, you don't use VALUE, or ASSTRING eachtime.
MSSQL don't convert autmaticaly the data.
For a date you use
Q.ParamByName('DATE1').AsDateTime := Now;  ---> The date is a numeric value

Laurent

Quote
Albert Ivanov wrote in message <6imibo$sq...@forums.borland.com>...
>Hi,
>Please anyone that used dates in this configuration (MS SQL 6.5 - SP3 +
>hotfix 4 or whatever it's called), Delphi 3.01 C/S and SQL Links (4.51)
>Each time I try to store a date, the BDE converts it to "dd mmmm yyyy"
>format, and SQL cannot accept it (found this in SQL Trace). I cannot make
>BDE to just send the date in plain dd/mm/yyyy format. Changing the
>"dateFormat" parameter in BDEAdmin does not change anything.
>Any idea ?

Other Threads