Installation guide
mxODBC - Python ODBC Database Interface
SQL Type Python Type Comments
SQL.WLONGVARCHAR
(TEXT, BLOB or LONG in
SQL)
stringified object
Non-string objects are passed
through unicode(obj,
cursor.encoding) to convert
them to Unicode objects, except
numbers, which are passed through
unicode(obj), i.e. without using
the connection encoding.
The handling of Unicode depends on
the setting of the .stringformat
attribute.
In EIGHTBIT_STRINGFORMAT and
UNICODE_STRINGFORMAT
mode, Unicode is converted to an 8-
bit string before passing it to the
ODBC driver using the
cursor.encoding setting. Strings
are passed as-is.
In all other modes, Unicode is
passed to the ODBC driver as native
Unicode. Strings are converted to
Unicode before passing them to the
ODBC driver using the
cursor.encoding setting.
Note that for mxDateTime input
objects, seconds rounding is applied
just like for SQL.TIMESTAMP SQL
types. For DateTimeDelta input
objects, seconds are truncated to
whole seconds.
SQL.BINARY,
SQL.VARBINARY,
SQL.LONGVARBINARY
(BLOB or LONG BYTE in
SQL)
buffer, memoryview or String Truncation at the SQL field length.
These columns can contain
embedded 0-bytes and other special
characters.
Handling of these column types is
database dependent. Please refer to
the database's documentation for
details.
Many databases store the passed in
data as-is and thus make these
columns types useable as storage
facility for arbitrary binary data.
Note that for mxDateTime input
objects, seconds rounding is applied
just like for SQL.TIMESTAMP SQL
types. For DateTimeDelta input
objects, seconds are truncated to
whole seconds.
SQL.TINYINT,
SQL.SMALLINT,
Integer or
any other object which can be
Conversion from the Python integer
(a C long) to the SQL type is left to
144