ODBC

lblr33 at yahoo.com lblr33 at yahoo.com
Thu Jan 26 16:57:47 EST 2006


I would like to connect to an Oracle database.  In python version 2.1 I
used the following code and it worked fine.  When I run the code in
version 2.4 it says that the odbc moduled does not exist.  How do you
connect to an Oracle database in v2.4?

oradb=odbc.odbc('oracle/scott/tiger')
stmt='select project_id from s_projects'
cur=oradb.cursor()
cur.execute(stmt)
for rec in cur.fetchall():
    print rec[0]
cur.close()

Thanks




More information about the Python-list mailing list