[DB-SIG] How to connect to informix DB in an easy way

James Briggs jimmy.briggs at gmail.com
Tue Aug 25 02:04:04 CEST 2009

I have had success in connecting to almost any database using the pyodbc


The difficult part is finding the correct connection string - see

I haven't connected to an Informix database myself, but have connected to
everything from Access, SQL Server to DB2 on Series i.
For some of these an ODBC driver will eed to be installed on your PC (unless
one is already provided by Microsoft).
The driver name can be found in the ODBC administration part of the Windows
control panel when you add a new ODBC DSN.

For Example:
Access_connect-str = 'Driver={Microsoft Access Driver
MSSQL_connect_str = 'DRIVER={SQL
iSeries_connect_str = 'DRIVER={iSeries access ODBC

For Informix using microsoft's .net driver -
connect_str='Provider=Ifxoledbc;Data Source=dbName at serverName;User ID=

Using a connection string such as one of the ones above a connection is
created as follows

If you can define an ODBC data source (through windows ODBC administration
tool) a connection can be created with:
           db=pyodbc.connect('DSN=%s;UID=%s;PWD=%s' %

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/db-sig/attachments/20090825/7d803950/attachment.htm>

More information about the DB-SIG mailing list