You are not logged in.
Pages: 1
Hi @ab, this fix https://synopse.info/fossil/info/f69f5eb7d2ed6541 introduced a bug with error "Invalid point operation".
your fix:
...
ftDate, ftTime, ftDateTime:
if PDateTime(Data)^=0 then
result := false else begin
TS := DateTimeToTimeStamp(PDateTime(Data)^);
if (TS.Time<0) or (TS.Date<=0) then
result := false else // matches ValidateTimeStamp() expectations
case Field.DataType of
ftDate: PDateTimeRec(Dest)^.Date := TS.Date;
ftTime: PDateTimeRec(Dest)^.Time := TS.Time;
ftDateTime: PDateTimeRec(Dest)^.DateTime := TimeStampToMSecs(TS) //-->> YOUR FIX !!!
end;
end;
ftString: begin
...
the solution:
...
ftDate, ftTime, ftDateTime:
if PDateTime(Data)^=0 then
result := false else begin
TS := DateTimeToTimeStamp(PDateTime(Data)^);
if (TS.Time<0) or (TS.Date<=0) then
result := false else // matches ValidateTimeStamp() expectations
case Field.DataType of
ftDate: PDateTimeRec(Dest)^.Date := TS.Date;
ftTime: PDateTimeRec(Dest)^.Time := TS.Time;
ftDateTime: PDateTimeRec(Dest)^.DateTime := PDateTime(Data)^; //-->> THE SOLUTION !!!
end;
end;
ftString: begin
...
this correction working for me, but I can be wrong.
Best regards.
Esteban
Offline
Please check https://synopse.info/fossil/info/38a40616cc
Offline
works fine.
Thanks.
Esteban
Offline
That don't works for me. The @ab solution works.
ftDateTime: PDateTimeRec(Dest)^.DateTime := TimeStampToMSecs(TS);
^this works
Offline
That don't works for me too.
The @ab solution works.
--> ftDateTime: PDateTimeRec(Dest)^.DateTime := TimeStampToMSecs(TS);
If TS have not Time part (TS.Time = 0) then PDateTime(Data)^ doesn't have a valid date.
I used DataSetToJSON(MyInterbaseQuery) to store data in RawUTF8 buffer.
I reload data with TSynSQLTableDataSet.CreateFromJSON(nil, MyBuffer, MyTSQLFieldsType)
Offline
@ab what you think?
Offline
my solution solved my problem with new data but not with existing, I can confirm that the bug regression still exists.
Esteban
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
Pages: 1