Installation guide
8. Data Types supported by mxODBC
configured with Unicode support. It also supports SQL commands given as
Unicode data. However, it does not handle Unicode at the schema interface level,
that is e.g.
cursor.description will not return Unicode objects for the column
names. This may be added to a future version of mxODBC, but is currently not
supported by the package.
8.9 Additional Comments
The above SQL types are provided by each subpackage in form of SQL type code
integers through attributes of the singleton object
SQL, e.g. SQL.CHAR is the type
integer for a CHAR column.
You can decode the
type_code value in the cursor.description tuple by
comparing it to one of those constants. A reverse mapping of integer codes to
code names is provided by the dictionary
sqltype which is provided by all
subpackages.
Note:
You may run into problems when using the tuple versions for
date/time/timestamp arguments. This is because some databases (notably MySQL)
want these arguments to be passed as strings. mxODBC does the conversion
internally but tuples turn out as: '(1998,4,6)' which it will refuse to accept. The
solution: use DateTime[Delta] instances instead. These convert themselves to ISO
dates/times which most databases (including MySQL) do understand.
To check the ODBC driver/manager capabilities and support for the above column
types, run the included mx/ODBC/Misc/test.pyc test script.
155