Re: [cx-oracle-users] How do you pass a boolean to a stored procusing cx_Oracle?
Brought to you by:
atuining
From: JG <z28...@gm...> - 2006-11-22 19:37:01
|
Thank you! I will try the workaround you mention below. I think that would be what I need. In the meantime, I have just changed the stored proc to take an number instead of the boolean. I will try your solution. thanks a bunch! regards, joe "Anthony Tuininga" <ant...@gm...> wrote in message news:703...@ma...... > Passing booleans with callproc() is not currently supported __BUT__ I > do have code in the currently unreleased version which does support > it. I'm not sure exactly when I intend to release that code yet. If > you're desperate for it I can provide you the latest source. :-) > > If you want to call it without the latest code you need to do > something like the following instead: > > cursor.execute(""" > begin > testproc(:1, :2 = 1); > end;""", > [123, int(True)]) > > On 11/22/06, JG <z28...@gm...> > wrote: >> 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 >> >> >> >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share >> your >> opinions on IT & business topics through brief surveys - and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV |