Installation guide
mxODBC - Python ODBC Database Interface
•
db.setinputsizes() and db.setoutputsizes() are dummy
functions; this is allowed by DB API 2.0.
• The type objects / constructors (formerly found in the
dbi module
defined by DB API 1.0) are only needed if you want to write database
independent code.
• The connection constructor is available under three different names:
ODBC() (DB API 1.0), connect() (DB API 2.0) and Connect() (mxODBC
specific). See the next section for details on the used parameters.
mxODBC also defines a
DriverConnect() constructor which is available
for ODBC managers and some ODBC drivers. If you can, please use the
DriverConnect() API since this provides more flexibility in configuring
the connection.
5.1.2 Extensions
mxODBC extends the DB-API specification in a significant number of ways to
provide access to as many ODBC features as possible. If you want to stay
compatible to other Python DB-API compliant interface, you should only use
those interfaces which are mentioned in the Python DB-API specification
documents.
5.2 mxODBC and the ODBC Specification
Since ODBC is a widely supported standard for accessing databases, it should in
general be possible to use the package with any ODBC version 2.0 - 3.8
compliant ODBC database driver/manager. mxODBC prefers ODBC 3.x over 2.x
in case the driver/manager supports both versions of the standard.
5.2.1 Full access to most ODBC features
The ODBC API is very rich in terms of accessing information about what is stored
in the database. mxODBC makes most of these APIs available as additional
connection and cursor methods and these can be put to good use for database
and schema introspection.
Since many of the parameters and names of the ODBC function names were
mapped directly to Python method names (by dropping the SQL prefix and
converting them to lower-case), we kindly refer you to the Microsoft ODBC
Documentation and your ODBC driver documentation for low-level details on the
various APIs.
64