Easysoft Data Access

Why can't I insert timestamps with sub-millisecond fractions in to Microsoft SQL Server datetime field?

Last Reviewed:
27th November 2008

Microsoft SQL Server only does millisecond accuracy (precision of 3) on datetime columns, so anything sub-millisecond tends to generate an error such as 22008 [Microsoft][ODBC SQL Server Driver]Datetime field overflow. As the fraction part of a timestamp can range from 0 to 999,999,999 you need to specify the fraction in thousands of second.

If you are using column-wise bound parameters to insert a timestamp into a datetime field, make sure the ColumnSize is set to 23.

Applies To

Knowledge Base Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)