Installation guide

3. Access Databases using mxODBC
If you are running a 64-bit Python application, you will also have to have a
64-bit ODBC manager and ODBC driver installed.
If you are running a 32-bit Python application, you need an 32-bit ODBC
manager and ODBC driver.
Note that the ODBC manager may be capable of translating 32-bit or 64-bit
function calls to whatever the ODBC driver supports (this is called thunking).
Please check the documentation of your ODBC manager for details.
3.2 Accessing Databases from Windows
Most database ship with ODBC drivers for Windows, so setting up database
access for Python applications on Windows is fairly straight forward.
Once you’ve installed the ODBC drivers on the machine you are running your
Python application on, you will need to setup an ODBC Data Source. This can be
done using the ODBC Manager on Windows.
To avoid problems with system permissions, eGenix.com recommends setting up
System Data Sources, as these are usually accessible by all accounts on a
Windows machine.
Using the mxODBC connection constructor
mx.ODBC.Windows.DriverConnect() you can then setup a connection to the
database.
3.2.1 Looking for Windows ODBC Drivers ?
Microsoft supports a whole range of (desktop) ODBC drivers for various
databases and file formats. These are available under the name "ODBC Desktop
Database Drivers" (search the MS web-site for the exact URL) [wx1350.exe] and
also included in the more up-to-date "Microsoft Data Access Components"
(MDAC) archive [mdac_typ.exe].
It includes ODBC drivers for: Access, dBase, Excel, Oracle, Paradox, Text (flat file
CSV), FoxPro, MS SQL Server.
If you need to connect to databases running on other hosts, please contact the
database vendor or check the SQLSummit list of ODBC drivers
.
19