cx_oracle

L

Lukas Ziegler

Hi,

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
cursor.execute("""
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.

Cheers
lukas
 
?

=?ISO-8859-1?Q?Bernard_Delm=E9e?=

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.

Cheers,

Bernard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

cx_Oracle question 4
cx_Oracle execute procedure 3

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top