Re: [cx-oracle-users] Problem with Python 2.5 and named bind values?
Brought to you by:
atuining
From: David R. <dri...@ri...> - 2006-10-11 22:17:43
|
Thanks for the data point. Yes, Python 2.5 final. Unfortunately, it's HP/UX 11.23 on Itanium. Oracle is 10.1.x on both client and server. Glad it's probably only a problem on this weird platform. I have two good workarounds (Python 2.4.3, or numbered bind values), so I'll wait for a really rainy day before diving in and trying to fix it. Thanks. On 2006.10.11 07:41:17 -0600, Anthony Tuininga wrote: > I tried it in my own environment and it worked for me -- on a Fedora > Core 5 Linux box. Perhaps you could indicate a few more pieces of your > environment? Specifically the Oracle client version, Oracle server > version, operating system version. I'm assuming this is also with > Python 2.5 final, right? > > On 10/10/06, David Ripton <dri...@ri...> wrote: > > Here's a small script to test named bind values. > > > > # CODE testbind.py > > """Run me like this: python testbind.py user passwd dsn" > > import sys > > import cx_Oracle > > user, passwd, dsn = sys.argv[1:4] > > conn = cx_Oracle.Connection(user, passwd, dsn) > > cursor = conn.cursor() > > sql = "select owner from all_tables where table_name = :table_name" > > kwparams = {"table_name": "DUAL"} > > columns = cursor.execute(sql, kwparams) > > row = cursor.fetchone() > > print row[0] > > # END CODE > > > > With cx_Oracle 4.2 and Python 2.4.3, the test works fine. > > > > With cx_Oracle 4.2 and Python 2.5, I get an exception > > "cx_Oracle.DatabaseError: ORA-01008: not all variables bound" > > on the cursor.execute line. > > > > Can others reproduce this, or is the problem a quirk of my local > > environment? > > > > Thanks. -- David Ripton dri...@ri... |