SQLTimeStamp

I have a table with 2 TIMESTAMP columns. I need to store and retrieve values with millisecond precision in these columns.

While storing values is not a problem, the retrieving part is causing headaches.

I'm using an OracleDataSet and have tried the following approaches with no success so far :

1. Using a TSQLTimeStampField and FieldByName('..').AsSQLTimeStamp
2. Enabling TOracleSession.Preferences TimeStampAsString option and using FieldByName('..').AsString - got the Date in Oracle format, but could not convert it to TDateTime with milliseconds intact.
3. Disabling TOracleSession.Preferences TimeStampAsString option and using FieldByName('..').AsString - milliseconds get chopped off.

Any advice on how to retrieve the precise values without losing the millisecond precision ?

I have to use DOA 4.0.5 due to legacy code restrictions

Thanks in advance
 
The string value that is returned depends on the NLS_TIMESTAMP_FORMAT and NLS_TIMESTAMP_TZ_FORMAT registry keys of your Primary Oracle Home. If you include the milliseconds in this format, your application can process this information.
 
Back
Top