Maby problem in 5.80.0.37

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
erikfandersen
Posts: 9
Joined: Tue 26 Sep 2006 12:17

Maby problem in 5.80.0.37

Post by erikfandersen » Wed 08 Nov 2006 14:53

Hello!

In the latest version of ODAC two new methods has been added to TOraTimeStampField to convert to and from variants.

Ths method GetAsVariant is defined as:

if IsNull then
Result := Null
else
Result := AsTimeStamp.AsString

This means that a string value is returned on the form (example):
03-11-2006 12:50:47,000000

This format is however not compatible with Delphi VarToDateTime function (tested in Delphi7) because it expects a variant string on the form:
03-11-2006 12:50:47

If GetAsVariant is modified to look like this:

if IsNull then
result := Null
else
result := AsDateTime;

Then it will work. Any chance of a fix or is this intended behaviour?

Regards,
Erik

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 10 Nov 2006 12:28

This is intended behaviour. If we change the code of TOraTimeStampField.GetAsVariant method as you suggest then fractional seconds will be lost.

Post Reply