Installation guide

mxODBC - Python ODBC Database Interface
7.5 Cursor Object Constructors
Cursor objects are created using the connection method connection.cursor().
connection.cursor(name=None, cursor_options=())
Constructs a new Cursor Object with the given name using the connection and
initializes any provided cursor options. If no name is given, the ODBC driver or
database backend will create one dynamically.
Please see section 6.7 Connection Object Methods for details.
7.6 Cursor Object Methods
The following cursor methods are defined in the DB API:
.callproc(procname, parameters=(), parametertypes=None)
Call a stored database procedure with the given name.
The sequence of
parameters must contain one entry for each argument that
the procedure expects.
The result of the call is returned as modified list copy of the input sequence.
Input parameters are left untouched, output and input/output parameters
replaced with possibly new values in the list copy.
If
parametertypes is given, it defines the parameter types of the parameters
used in the
sqlcmd. The sequence has to provide one integer entry per
parameter. Possible values are
SQL.PARAM_INPUT (input parameter), SQL.
PARAM_OUTPUT
(output parameter) and SQL.PARAM_INPUT_OUTPUT
(input/output parameter). If
parametertypes is not given, default is to assume
input parameter types for all parameters.
The procedure may also provide one or more result sets as output. This can
then be fetched through the standard cursor.fetch*() methods.
Please see section 5.6 Stored Procedures
for more details on how to call stored
procedures.
.close()
Close the cursor now (rather than automatically at garbage collection time).
The cursor will be unusable from this point forward; an
Error (or subclass)
exception will be raised if any operation is attempted with the cursor.
.execute(sqlcmd, parameters=(), direct=-1, parametertypes=None)
Prepare and execute a database operation sqlcmd (query or command).
104