Connecting SA to an iSeries DB2 with pyodbc

471 views
Skip to first unread message

goschtl

unread,
Sep 30, 2008, 3:45:19 AM9/30/08
to sqlalchemy
Hi,

i try to connect with SA to an iSeries DB2 Database.
I use the pyodbc python module for this.

This piece of code is working:
-------------------------------------------------------------
import pyodbc
conn = pyodbc.connect('DSN=AS400')
curs = conn.cursor()
curs.execute('select count(edokimp_id) from edokimp')
print curs.fetchall()
-------------------------------------------------------------

Now some questions:

Is it possible to use pyodbc, sqlalchemy for an iSeriesDB2 Database?
I have seen in archives that pyodbc, sqlalchemy, MSSQL is working?



Thanks for help.
Christian

Michael Bayer

unread,
Sep 30, 2008, 10:09:08 AM9/30/08
to sqlal...@googlegroups.com
have you tried:

http://code.google.com/p/ibm-db/

the important part of the database connectivity is the dialect which
determines the rendering of SQL. We don't have that built in for DB2,
which is why I'd recommend IBM's dialect.

Reply all
Reply to author
Forward
0 new messages