Question

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!

Matt

Was it helpful?

Solution

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.

OTHER TIPS

Make sure you have the location of the oracle .dll (o files set in your PATH environment variable. The location containing oci.dll should suffice.

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.

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top