I'm preparing an insert statement like:
Code: Select all
...
QR_TABLE_INSERT.ParamByName('STARTTIME').DataType := ftOraTimeStamp;
QR_TABLE_INSERT.Prepare;
When I execute:
Code: Select all
QR_TABLE_INSERT.ParamByName('STARTTIME').AsDateTime := dtStartTime;
QR_TABLE_INSERT.Execute;
Code: Select all
INSERT INTO MY_TABLE
(ID, FIELD1, STARTTIME)
VALUES
(:ID, :FIELD1, :STARTTIME)
Could you please let me know is this is a bug or how can I avoid loosing the milliseconds?
I guess the ".AsDateTime" might be the problem because if I just use the .Value and copy from another table, then I don't loose the milliseconds.
Example:
Code: Select all
QR_TABLE_INSERT.ParamByName('STARTTIME').Value := QR_OTHER_TABLE.ParamByName('DATE_TIME').Value;