Page 1 of 1

Maby problem in 5.80.0.37

Posted: Wed 08 Nov 2006 14:53
by erikfandersen
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

Posted: Fri 10 Nov 2006 12:28
by Plash
This is intended behaviour. If we change the code of TOraTimeStampField.GetAsVariant method as you suggest then fractional seconds will be lost.