ZQuery.Lookup does not return TDateTime value
Posted: 16.07.2020, 11:19
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;
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;