Installation guide

mxODBC - Python ODBC Database Interface
SQL Type Python Type Comments
with float second values which
sometimes cannot be represented
with full accuracy.
SQL.TIMESTAMP
DateTime instance or
datetime.datetime instance or
datetime.date instance or
a tuple (year,month,day,
hour,minute,second) or
String/Unicode or
a ticks value as Python
number
While you should use DateTime
instances, the module also accepts
Python datetime.datetime instances,
datetime.date instances (the time
part is then set to 00:00:00), ticks
(Python numbers indicating the
number of seconds since the epoch;
these are converted to local time and
then stored in the database) and
tuples (year,month,day,
hour,minute,second) on input.
Seconds are rounded according to
the setting of the
.timestampresolution setting, which
defines the resolution of the
timestamps in nanoseconds.
mxODBC will round the timestamp's
second value to the nearest
nanosecond fraction defined by this
setting in order to avoid issues with
float second values which sometimes
cannot be represented with full
accuracy. If not set, the
.timestampresolution attribute
defaults to 1 nanosecond, so
rounding usually is done to the
nearest nanosecond, which is also
the smallest fraction supported by
the ODBC standard.
Any nullable column None
The Python None singleton is
converted to the special SQL NULL
value.
Unsupported Type String or
stringified object
Input binding to these columns is
done via strings (or stringified
versions of the input data).
Note that for mxDateTime input
objects, seconds rounding is applied
just like for SQL.TIMESTAMP SQL
types.
146