Environment: dbExpress driver 4.2.3, Delphi XE 15.0.3953.35171, FireBird 1.5.6.
We are testing trial version of the driver and found that it inserts into the database TSQLTimeStamp with millisecond precision. However, the driver in DelphiXE (dbxfb.dll) are accurate to within seconds. We would like to have backward compatibility during the transition to your driver. So we are interested in whether it is possible to disable this accuracy?
How to disable a millisecond?
Re: How to disable a millisecond?
The TSQLTimeStamp Delphi type holds the information about year, month, day, hour, minute, second, and fractions (that is, milliseconds). You can more information about this at http://docwiki.embarcadero.com/Librarie ... LTimeStamp
Our dbExpress driver for InterBase & Firebird correctly handles all this information. The fact that the standard driver for Firebird truncates milliseconds is a bug. You can write about this problem to the Embarcadero support.
If you want to remove milliseconds from TSQLTimeStamp, you should do it manually. Here is an example:
Our dbExpress driver for InterBase & Firebird correctly handles all this information. The fact that the standard driver for Firebird truncates milliseconds is a bug. You can write about this problem to the Embarcadero support.
If you want to remove milliseconds from TSQLTimeStamp, you should do it manually. Here is an example:
Code: Select all
var
ts: TSQLTimeStamp;
begin
// code
ts := DateTimeToSQLTimeStamp(Now);
ts.Fractions := 0;
ClientDataSet.Append;
ClientDataSet.FieldByName('timestampfield').AsSQLTimeStamp := ts;
// code
end;