Installation guide
mxODBC - Python ODBC Database Interface
7.7 Cursor Object Attributes
.arraysize
This read/write attribute specifies the number of rows to fetch at a time with
.fetchmany(). It defaults to 1 meaning to fetch a single row at a time.
mxODBC uses this value as default for the number of rows to fetch with
.fetchmany() method.
.bindmethod
Attribute to query and set the input variable binding method used by the
cursor. This can either be
BIND_USING_PYTHONTYPE of BIND_USING_SQLTYPE
(see the Constants
section 10.5 for details).
The attribute is inherited by cursors from their connections at creation time.
Cursors may override the setting on a per cursor basis without affecting the
connection that was used to create them.
.closed
This read-only attribute is true if the cursor or the underlying connection was
closed by calling the
.close() method.
Any action on a closed connection or cursor will result in a
ProgrammingError to be raised. This variable can be used to conveniently test
for this state.
.colcount
This read-only attribute specifies the number of columns in the current result
set.
The attribute is
-1 in case no .execute*() has been performed on the cursor.
Please note that accessing this attribute may result in database errors in case it
is used on cursors with prepared but not yet executed statements.
One of the reasons for this is that the ODBC drivers have not yet seen the
parameter values which will be bound to the parameter markers in the
statement, e.g.
"[Microsoft][ODBC SQL Server Driver][SQL
Server]Procedure or function 'myfunc' expects parameter
'@param1', which was not supplied."
.command
Provides access to the last SQL command string or Unicode object that was
passed to
.prepare() or .execute*(). If no such command is available,
None is returned.
It is set by
.prepare() and .execute*() and reset by calling one of the
catalog methods or
.close() on the cursor.
Note that
.command may be a Unicode object in case a Unicode object was
passed to one of the above methods.
134