Installation guide

mxODBC - Python ODBC Database Interface
.setcursoroption(option, value)
Sets a cursor option to a new value.
Only a subset of the possible option values defined by ODBC are available
since this method could otherwise easily cause mxODBC to segfault – it makes
changes possible which effect the way mxODBC interfaces to the ODBC
driver.
Only options with numeric values are currently supported.
Option Comment
SQL.ATTR_QUERY_TIMEOUT Sets the query timeout in seconds used for the cursor.
Queries that take longer raise an exception after the
timeout is reached.
Possible values:
Any positive integer or
SQL.QUERY_TIMEOUT_DEFAULT
Note that not all ODBC drivers support this option.
SQL.ATTR_ASYNC_ENABLE Enable asynchronous execution of commands.
Possible values:
SQL.ASYNC_ENABLE_OFF (default)
SQL.ASYNC_ENABLE_ON
SQL.ASYNC_ENABLE_DEFAULT
SQL.ATTR_MAX_LENGTH Maximum length of any fetched column. Default is no
limit.
Possible values:
Any positive integer or
SQL.MAX_LENGTH_DEFAULT (no limit)
SQL.ATTR_MAX_ROWS Limit the maximum number of rows to fetch in a result
set. Default is no limit.
Possible values:
Any positive integer or
SQL.MAX_ROWS_DEFAULT (no limit)
SQL.ATTR_METADATA_ID Tell the ODBC driver to interpret the catalog method
parameters as case-insensitive identifiers. Default is to
112