views:

198

answers:

3

Hello guys

At work we have Oracle 7. I would like to use python to access the DB. Has anyone done that or knows how to do it? I have Windows XP, Python 2.6 and the cx_oracle version for python 2.6

However, when I try to import cx_oracle i get the following error:

ImportError: DLL load failed the module could not be found

Any help is appreciated!

Gloria

+1  A: 

cx_Oracle is currently only being provided with linkage to the 9i, 10g, and 11i clients. Install one of these clients and configure it to connect to the Oracle 7 database using the proper ORACLE_SID.

TML
Ok. We have 9i now but I still get the same error "ImportError: DLL Load failed"Oracle: 9iPython: 2.6Windows: XP SP2cxOracle: 5.01-py2.6any more help is again very appreciated!Thanks for your comments!
Paul the n-th
Use a tool like [Dependency Walker][1] to track down the missing DLL.[1]: http://www.dependencywalker.com/
TML
cx_Oracle 4.4.1 seems to be the latest version with 9i support.
Kevin Horn
A: 

I was running into that same problem at work. I finally dropped trying to use cx_Oracle and went with adodbapi. It worked with Oracle 8.

ecounysis
A: 

If you have ODBC configured then you can use it. It is available with ActivePython or as win32 extensions. You will obtain connection with:

connection = odbc.odbc('db_alias/user/passwd')

Optionally you can use Jython and thin JDBC client. Instalation of client is not required. With Jython you have access to db via db url:

db = DriverManager.getConnection(db_url, usr, passwd)

where db_url looks like:

jdbc:oracle:thin:user/passwd@machine_ip:port:dbname
Michał Niklas