Using TOraLoader with a Timestamp column
Posted: Tue 29 Mar 2005 12:05
I am trying to load a TDateTime variable into an Oracle table that has a timestamp column. The milliseconds in the time are being truncated in the Oracle table.
Discussion forums for open issues and questions concerning database tools, data access components and developer tools from Devart
https://forums.devart.com/
Code: Select all
Table TimeStampTest (
StartTime TIMESTAMP(3)
)
Code: Select all
RecCount := 100;
OraSQL.SQL.Clear;
OraSQL.SQL.Text := 'INSERT INTO TimeStampTest (StartTime) VALUES
(:StartTime)';
OraSQL.ParamByName('StartTime').DataType := ftTimeStamp;
OraSQL.ParamByName('StartTime').ParamType := ptInput;
OraSQL.ArrayLength := RecCount;
for i := 1 to RecCount do begin
OraSQL.ParamByName('StartTime').ItemAsTimeStamp[i].Format := 'DD.MM.YYYY HH24:MI:SS.FF';
OraSQL.ParamByName('StartTime').ItemAsTimeStamp[i].AsString := '01.04.2005 12:01:02.03';
end;
OraSQL.Execute(RecCount);