| From: | "A(dot) Ozen Akyurek" <akyurek(at)tr(dot)net> |
|---|---|
| To: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | BUG #3812: Delphi TADOStored procedure truncates time portion of the ftDateTime parameter using ODBC |
| Date: | 2007-12-10 20:30:21 |
| Message-ID: | 200712102030.lBAKULkD035665@wwwmaster.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 3812
Logged by: A. Ozen Akyurek
Email address: akyurek(at)tr(dot)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)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2007-12-10 23:21:49 | Re: [HACKERS] BUG #3799: csvlog skips some logs |
| Previous Message | Alvaro Herrera | 2007-12-10 15:24:57 | Re: [HACKERS] BUG #3799: csvlog skips some logs |