Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Midas/TClientDataSet    [ Add a report in this area ]  
Report #:  132817   Status: Resolved
SysUtils fix XE8
Project:  Delphi Build #:  0
Version:    21.0 Submitted By:   Alex Dumitrescu
Report Type:  Issue Date Reported:  7/30/2015 2:07:37 AM
Severity:    Commonly encountered problem Last Updated: 11/18/2015 6:59:02 AM
Platform:    All platforms Internal Tracking #:   70347
Resolution: Cannot Reproduce (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
EConvertError: "0.0" is not a valid timestamp when I try to read a SQLTimestamp.
I have encountered a ticket on QC (73852) that was tagged as fixed, although in my Delphi XE8 the fix that was proposed was not implemented.
Steps to Reproduce:
Try to load a null TimeStamp in a dataset.
Workarounds
procedure ValidateTimeStamp(const TimeStamp: TTimeStamp);
begin
  if (TimeStamp.Time < 0) or (TimeStamp.Date < 0) or  {TimeStamp.Date < 0 was TimeStamp.Date <= 0}  
     (TimeStamp.Time >= IMSecsPerDay) then
    ConvertErrorFmt(@SInvalidTimeStamp, [TimeStamp.Date, TimeStamp.Time]);
end;
Attachment
None
Comments

Alex Dumitrescu at 7/30/2015 2:08:39 AM -
The workaround must be done in the SysUtils.pas

Server Response from: ETNACODE01