Installation guide

mxODBC - Python ODBC Database Interface
mxODBC addresses this by defaulting to connection.timestampresolution =
1000000
for SQL Server 2005 and earlier. For SQL Server 2008 and later,
mxODBC uses
connection.timestampresolution = 100.
This allows using timestamp values with SQL Server which use higher precision
values without running into errors from the database such as:
HY104 - [Microsoft][SQL Server Native Client 11.0] Invalid
precision value.
However, please be advised that reducing the precision of input values requires
rounding, which can lead to unexpected results. mxODBC does make sure that
the seconds whole value is not altered by the rounding to reduce unwanted
surprises. Please see the documentation on
connection.timestampresolution
for details.
Multiple Cursors on Connections / MARS
If you have troubles with multiple cursors on connections to MS SQL Server the
MS Knowledge Base Article 140896 INF: Multiple Active Microsoft SQL Server
Statements has some valuable information for you.
You have to explicitly enable support for multiple active cursors (MARS) or force
the usage of server side cursors to be able to execute multiple statements on a
single connection to MS SQL Server. According to the article this is done by
setting the connection option SQL.CURSOR_TYPE to e.g.
SQL.CURSOR_DYNAMIC:
dbc.setconnectoption(SQL.CURSOR_TYPE, SQL.CURSOR_DYNAMIC)
If you are using the MS SQL Server Native Client, you can also enable the MARS
feature on the client side by setting a connect option during connect. Please see
the section "Multiple active result sets (MARS) on a single connection" further up
for details.
International Character Data
If you are experiencing problems with MS SQL Server not storing or fetching
international character data (Unicode, Asian encodings, etc.) correctly, please
have a look at the following MS Knowledge Base Articles:
232580 - INF: Storing UTF-8 Data in SQL Server
257668 - FIX: SQL Server ODBC Driver May Cause Incorrect Code
Conversion of Some Characters
234748 - PRB: SQL Server ODBC Driver Converts Language Events to
Unicode
More information about the MS SQL Server ODBC Driver and the various
connection parameters and options are available on the MSDN Library site: MS
SQL Server ODBC Driver Programmer's Guide.
40