Re: Delphi DateTime is incompatable with SQL Server datetime.
- From: Yoni <yoni@xxxxxxxxxxxxx>
- Date: Mon, 03 Jul 2006 17:51:24 +0200
ÐíÔÆ wrote:
In Delphi:the problem is when delphi / ODBC extract the parameters info they set it to adDate
AStartTime: '2006-04-17 00:00:00'
AEndTime : '2006-04-17 23:59:59'
with Parameters do
begin
ParamByName('start_time').Value := StartOfTheDay(AStartTime);
ParamByName('end_time').Value := EndOfTheDay(AEndTime);
end;
And now in SQL Server the parameter turns out to be:
'04 16 2006 12:00:00:000AM'(start time?), '04 17 2006 12:00:00:000AM'(end
time?)
is it a problem of delphi or ado/msdac or sql server?
TO solve this problem you have to set the oleParameter to adDBTimeStamp like this
ADOQuery1.Parameters.ParamByName('end_time').ParameterObject.Type_ := adDBTimeStamp;
Yoni.
.
- Prev by Date: Re: ADO, MySQL, DateTime
- Next by Date: Re: Problem with TDateTime and ADO
- Previous by thread: Re: ADO, MySQL, DateTime
- Next by thread: Re: Problem with TDateTime and ADO
- Index(es):
Relevant Pages
|