BUG #3812: Delphi TADOStored procedure truncates time portion of the ftDateTime parameter using ODBC

Started by A. Ozen Akyurekover 18 years ago1 messagesbugs
Jump to latest
#1A. Ozen Akyurek
akyurek@tr.net

The following bug has been logged online:

Bug reference: 3812
Logged by: A. Ozen Akyurek
Email address: akyurek@tr.net
PostgreSQL version: 8.2
Operating system: Windows XP
Description: Delphi TADOStored procedure truncates time portion of
the ftDateTime parameter using ODBC
Details:

I have a simple function

create or replace function GetDate(adate out timestamp) as $$
begin
adate := now();
end;
$$language plpgsql;

With that function

select GetDate();

works fine.

But if you use it in Delphi in the following way;

// Delphi code here
procedure TForm1.Button1Click(Sender: TObject);
var t:tdatetime;
begin
ADOStoredProc1.ExecProc;
t := ADOStoredProc1.parameters.parambyname('adate').value;
ShowMessage(DateTimeToStr(t));
end;

Time portion of the result is truncated (e.g instead of 2007-12-10 22:15:38,
the result is 2007-12-10 only)