471,355 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,355 software developers and data experts.



I want to get an access to an oracle database.
For that I found the module cx_oracle
(http://www.python.net/crew/atuining/cx_Oracle/) and
I have installed the version 'Windows Installer (Oracle 10g, Python 2.5)'.

Now I tried to run the script in the readme file:
import cx_Oracle

# connect via SQL*Net string or by each segment in a separate argument
#connection = cx_Oracle.connect("user/password@TNS")
connection = cx_Oracle.connect("user", "password", "TNS")

cursor = connection.cursor()
cursor.arraysize = 50
select Col1, Col2, Col3
from SomeTable
where Col4 = :arg_1
and Col5 between :arg_2 and :arg_3""",
arg_1 = "VALUE",
arg_2 = 5,
arg_3 = 15)
for column_1, column_2, column_3 in cursor.fetchall():
print "Values:", column_1, column_2, column_3

And I got an error:
Traceback (most recent call last):
File "C:\Python25\cal_adjustment.py", line 1, in <module>
import cx_Oracle
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
Do someone have an idea to solve the problem? A reinstall doesn't work.


Jun 24 '07 #1
1 2468
Hi Lukas,

you will need a working oracle OCI client middleware before
cx_oracle can talk to your database. The easiest nowadays
is the so-called instant client, which must be available
from the otn.oracle.com site (downloads might require a
free registration). Try to get sql*plus working (the standard
Oracle command-line client), and cx should then pose no problem.


Jun 24 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by GrayGeek | last post: by
8 posts views Thread by Rodrigo Daunaravicius | last post: by
1 post views Thread by Greg Lindstrom | last post: by
1 post views Thread by jmdeschamps | last post: by
1 post views Thread by Maxim Kuleshov | last post: by
5 posts views Thread by Daniel | last post: by
4 posts views Thread by infidel | last post: by
7 posts views Thread by Carl K | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.