Easysoft
ODBC Drivers for Oracle, SQL Server, Firebird, ISAM, InterBase, Sybase, MS Access & more.

Easysoft Data Access

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

Article : 00987
Last Reviewed : 27th November 2008
Revision : 2

Firstly, consult http://support.microsoft.com.

MS 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 in to a datetime field make sure the ColumnSize is set to 23.

Applies To

Knowledge Base Feedback

* Did this content help you?
Yes
No
Maybe
 
* Please select one option based on your first choice:
I'm very satisfied
I think it will help, but I haven't tried it yet
It is helpful, but I need more information
It is helpful, but hard to understand
Seemed relevant in search results, but didn't help me
The information is incorrect
The page contains one or more broken links
 
  Suggest new content or let us know how we can improve this content:

 
  (* Required Fields)   



© 1993 - 2012 Easysoft Limited. All rights reserved.