How to pass a boolean to a stored proc using Cx_Oracle?

J

JG

Hi,
I am using Python 2.4 and cx_Oracle. I have a stored proc that takes two
arguments. First is an NUMBER, second is a BOOLEAN. How do you call that
stored procedure?

After properly extablishing a connection, I have something like this:

cursor = con.cursor()
cursor.callproc("testproc",[123,True])

The problem I have ran into is that I keep getting an error from Oracle
stating I don't have the variables defined in with the proper type. I
changed to proc just to test it, so that it would take two numbers. I was
able to make it run properly.

So, what is the trick to pass a boolean?

Thanks,
joe
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top