Installation guide
mxODBC - Python ODBC Database Interface
null_ok [6]
Returns 1 if the column can contain NULL values (which are returned as None
in Python).
The cursor.getcolattribute() method
The cursor.getcolattribute() method provides more information about the
result set columns than the Python DB-API compatible
cursor.description
sequence.
It also allows querying for auto-increment columns, the base column and table
name, the database specific type name, etc.
Please see the document for
cursor.getcolattribute() in section 7.6 Cursor
Object Methods for details.
5.8 ODBC Cursor Types
Starting with mxODBC 3.2, mxODBC supports several different ODBC cursor
types. These types define how the cursors will be used by the application and
whether or not the application will see changes to the result set while fetching the
result set rows.
As with other cursor settings, the ODBC cursor type default value can be defined
on the mxODBC connection object and the setting is then inherited by the
mxODBC cursor objects created on that connection. Subsequent changes to the
cursor type on the cursor do not affect the setting on the connection.
5.8.1 Adjusting/Inspecting the ODBC Cursor Type
Both connections and cursors expose a read/write .cursortype attribute for this
purpose. The attribute uses the ODBC defined values for the cursor types.
The following values are defined in the ODBC standard:
9
SQL.CURSOR_FORWARD_ONLY
The cursor only scrolls forward. This is the default setting used by
mxODBC for all databases.
10
9
The SQL global refers to the mxODBC subpackage global of the same name, e.g. for
mx.ODBC.Windows, this is accessible as mx.ODBC.Windows.SQL.
10
Please note that in mxODBC 3.2, the default was database dependent.
78