ZQuery.Lookup does not return TDateTime value

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Post Reply
ash71
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 04.05.2020, 13:05

ZQuery.Lookup does not return TDateTime value

Post by ash71 »

hello.
latest Lazarus win32 with ZeosLib 7.3 and sql server 2014

In my case:
varArray := ZQuery.Lookup'('ID', valueID, 'ID;DateAndTime;');
varArray [1] is null;

for me I fixed in ZVariant.pas

function EncodeVariant(const Value: TZVariant): Variant;
added:

vtTimeStamp: // MYFIF
begin
if TryTimeStampToDateTime(Value.VTimeStamp, dt)
then Result := dt
else Result := Null;
end;
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1962
Joined: 17.01.2011, 14:17

Re: ZQuery.Lookup does not return TDateTime value

Post by marsupilami »

Hello and welcome to the forums :)

Your fix has been included in Rev. 6714. Thank you for helping :)

Best regards,

Jan
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: ZQuery.Lookup does not return TDateTime value

Post by EgonHugeist »

I found some more missing conversions and did add all of them in https://sourceforge.net/p/zeoslib/code-0/6716/
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Post Reply