Reputation: 1239
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
Upvotes: 4
Views: 1219
Reputation: 21
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.
Upvotes: 2
Reputation: 54302
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
Upvotes: 0
Reputation: 3231
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.
Upvotes: 0
Reputation: 12966
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.
Upvotes: 2