You are not logged in.
Hi,
Base is Sample 17
mORMotVCLUnit
I get an invalid timestamp error if e try to show a datefield
procedure TForm1.FormCreate(Sender: TObject);
begin
fProps := TSQLDBOracleConnectionProperties.Create('dbname','','user','pwd');
end;
...
var
t : TDateTime;
...
ds1.DataSet := TSynDBSQLDataSet.Create(self);
TSynDBSQLDataSet(ds1.DataSet).Connection := fProps;
TSynDBSQLDataSet(ds1.DataSet).CommandText := 'select DATUM from mtest';
ds1.DataSet.Open;
ds1.DataSet.First;
while not ds1.DataSet.Eof do
begin
//if i use in SynVirtualDataSet an old version
//function TSynVirtualDataSet.GetFieldData(Field: TField; Buffer: Pointer): Boolean;
//...
//ftDateTime:
// DateTimeToNative(Field.DataType,PDateTime(Data)^,Dest^);
//then no error hier
t := ds1.DataSet.FieldByName('DATUM').AsDateTime;
// but if i use in SynVirtualDataSet the last version
//ftDateTime:
// TDatetimeRec(Dest^) := PDateTime(Data)^;
// i get an error hier <<< invalid timestamp
t := ds1.DataSet.FieldByName('DATUM').AsDateTime;
st := DateToStr(t);
if st ='' then;
ds1.DataSet.Next;
end;
Hope you can understand the problem
Thank you.
Offline
I got the same problem.
Offline
Please try https://synopse.info/fossil/info/d171280064
I've reverted to the previous version, which was reported to work - but for EMartin...
Offline