mx.DateTime, mx.ODBC.Windows, and MS SQL Server - Fractional truncation error

robin and jim robinjim at earthlink.net
Mon May 14 18:52:19 EDT 2001


Has anyone seen this type of SQL error with mx.DateTime, mx.ODBC.Windows,
and MS SQL Server?

import mx.DateTime

date_time_0 = mx.DateTime.GregorianDateTime (2001, 5, 14, 17, 12, 47.20)
date_time_1 = mx.DateTime.GregorianDateTime (2001, 5, 14, 17, 13, 14.978)

date_time_0 can be inserted in a table containing an SQL DATETIME data type
column.

date_time_1 can NOT be inserted in a table containing an SQL DATETIME data
type column.
The error message is:
('01004', 0, '[Microsoft][ODBC SQL Server Driver]Fractional truncation',
4479)

Some details about the execution framework are:

Python 2.0
mx.DateTime 2.0.0
mx.ODBC 2.0.1
MS SQL Server 2000
MS Windows 2000


Thanks in advance for any suggestions.





More information about the Python-list mailing list