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

Поиск
Список
Период
Сортировка
От A. Ozen Akyurek
Тема BUG #3812: Delphi TADOStored procedure truncates time portion of the ftDateTime parameter using ODBC
Дата
Msg-id 200712102030.lBAKULkD035665@wwwmaster.postgresql.org
обсуждение исходный текст
Список pgsql-bugs
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)

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] BUG #3799: csvlog skips some logs
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] BUG #3799: csvlog skips some logs