Installation guide
mxODBC - Python ODBC Database Interface 
Example: 
'SELECT * FROM MyTable WHERE A=? AND B=?' used with a 
parameter tuple 
(1, 2) would result in the database executing the query 
'SELECT * FROM MyTable WHERE A=1 AND B=2'. 
'named' 
The 'named' parameter binding style is used by the native database 
interfaces of e.g. Oracle. 
Parameters in SQL statements used on 
cursor.execute*() methods are 
marked with a colon followed by a name, e.g. 
':a' or ':1'. The variables 
are bound to these parameter locations using a name based mapping. 
Parameter values for a SQL statement must be specified as mapping, 
normally a dictionary, and are bound to the locations based on the names 
used in the SQL statement. 
Example: 
'SELECT * FROM MyTable WHERE A=:a AND B=:b' used with 
a parameter dictionary 
{'a': 1, 'b': 2} would result in the database 
executing the query 
'SELECT * FROM MyTable WHERE A=1 AND B=2'. 
.row 
This attribute sets the default cursor.row object constructor to be used by all 
newly created cursor objects on this connection. 
The purpose of this attribute is to define a constructor for rows in result sets 
fetched using the 
cursor.fetch*() methods. 
Default is 
None, which means that mxODBC will use regular Python tuples for 
returning row data in result sets. 
Please see the 
cursor.row cursor attribute documentation in section 7.7 for 
more details. 
.rowfactory 
This attribute sets the default cursor.rowfactory row object constructor 
factory to be used by all newly created cursor objects on this connection. 
The purpose of the row factory is to dynamically set the 
cursor.row attribute 
after having executed a statement on the cursor. 
Default is 
None, which means that mxODBC will not use a row factory 
function and leave 
cursor.row untouched. 
Please see the 
cursor.rowfactory cursor attribute documentation in section 
7.7 for more details. 
.stringformat 
Use this attribute to set or query the default input and output handling for 
string columns of all cursors created using this connection object. Data 
conversion on input is dependent on the input binding type. 
Possible values are (see the Constants
 section 10.5 for details): 
EIGHTBIT_STRINGFORMAT (default) 
This format tells mxODBC to convert all data passed to and read from 
the ODBC driver to 8-bit strings. 
98 










