Re: Oracle cursor.execute problem

2010-06-15 Thread Ian
On Jun 15, 7:14 am, gentlestone wrote: > sorry for disturb - I'm lazy to create a new topic - another bug in > Oracle Back-End is about using queryset.only() - there are wrong value/ > field indexing Please submit a bug report at: http://code.djangoproject.com/simpleticket When creating the tic

Re: Oracle cursor.execute problem

2010-06-15 Thread gentlestone
sorry for disturb - I'm lazy to create a new topic - another bug in Oracle Back-End is about using queryset.only() - there are wrong value/ field indexing seems to be Oracle is not a Django (or an Open Source) favorite environment can I somewhere found another similar Oracle Back-End issues? Goog

Re: Oracle cursor.execute problem

2010-04-29 Thread Tim Sawyer
Excellent, I'll give trunk a go. Thanks Ian. Tim. Ian wrote: On Apr 27, 2:36 pm, Tim Sawyer wrote: Hmm, nearly. That gets around the error, but the return value isn't populated. >>> import cx_Oracle >>> from django.db import connection >>> cursor = connection.cursor() >>> lOutput = cur

Re: Oracle cursor.execute problem

2010-04-28 Thread Ian
On Apr 27, 2:36 pm, Tim Sawyer wrote: > Hmm, nearly.  That gets around the error, but the return value isn't > populated. > >  >>> import cx_Oracle >  >>> from django.db import connection >  >>> cursor = connection.cursor() >  >>> lOutput = cursor.var(cx_Oracle.STRING) >  >>> cursor.execute("BEGIN

Re: Oracle cursor.execute problem

2010-04-27 Thread Tim Sawyer
Ian wrote: On Apr 25, 11:13 am, Tim Sawyer wrote: >>> import cx_Oracle >>> from django.db import connection >>> cursor = connection.cursor() >>> lOutput = cursor.var(cx_Oracle.STRING) >>> cursor.execute("BEGIN %s := 'N'; END;", [lOutput]) Traceback (most recent call last): File "", lin

Re: Oracle cursor.execute problem

2010-04-26 Thread Ian
On Apr 25, 11:13 am, Tim Sawyer wrote: >  >>> import cx_Oracle >  >>> from django.db import connection >  >>> cursor = connection.cursor() >  >>> lOutput = cursor.var(cx_Oracle.STRING) >  >>> cursor.execute("BEGIN %s := 'N'; END;", [lOutput]) > Traceback (most recent call last): >    File "", lin

Re: Oracle cursor.execute problem

2010-04-25 Thread Tim Sawyer
Ian wrote: On Apr 23, 1:59 pm, Tim Sawyer wrote: Hello. This code works fine: >>> import cx_Oracle >>> lDsn = cx_Oracle.makedsn(lDatabaseHost, int(lDatabasePort), lDatabaseName) >>> lConnectString = "%s/%...@%s" % (lDatabaseUsername, lDatabasePassword, lDsn) >>> lConnection = cx_Oracle.co

Re: Oracle cursor.execute problem

2010-04-23 Thread Ian
On Apr 23, 2:45 pm, Skylar Saveland wrote: > Ah, I guess it's only %s and strings for execute?  At anyrate, the > third argument to connection.execute(self, query, parms=None), params, > is a list of strings, each member of the list should have a '%s' > placeholder in the query.  The string-format

Re: Oracle cursor.execute problem

2010-04-23 Thread Ian
On Apr 23, 2:44 pm, Ian wrote: > Django cursors universally use the 'format' dbapi paramstyle rather > than the 'named' style natively used by cx_Oracle [1].  To convert > your query, replace the parameter markers with %s and pass the > parameters as a list rather than a dictionary. > > If you ins

Re: Oracle cursor.execute problem

2010-04-23 Thread Skylar Saveland
Ah, I guess it's only %s and strings for execute? At anyrate, the third argument to connection.execute(self, query, parms=None), params, is a list of strings, each member of the list should have a '%s' placeholder in the query. The string-formatting link is a not really germane .. On Apr 23, 4:3

Re: Oracle cursor.execute problem

2010-04-23 Thread Ian
On Apr 23, 1:59 pm, Tim Sawyer wrote: > Hello. > > This code works fine: > >  >>> import cx_Oracle >  >>> lDsn = cx_Oracle.makedsn(lDatabaseHost, int(lDatabasePort), > lDatabaseName) >  >>> lConnectString = "%s/%...@%s" % (lDatabaseUsername, > lDatabasePassword, lDsn) >  >>> lConnection = cx_Oracl

Re: Oracle cursor.execute problem

2010-04-23 Thread Skylar Saveland
Looking at the source for execute on django-trunk in django.db.backends.oracle If you have a param, you will have an arg for the query (type: string). http://docs.djangoproject.com/en/dev/topics/db/sql/#executing-custom-sql-directly ... your params should be a list of things to interpolate into

Oracle cursor.execute problem

2010-04-23 Thread Tim Sawyer
Hello. This code works fine: >>> import cx_Oracle >>> lDsn = cx_Oracle.makedsn(lDatabaseHost, int(lDatabasePort), lDatabaseName) >>> lConnectString = "%s/%...@%s" % (lDatabaseUsername, lDatabasePassword, lDsn) >>> lConnection = cx_Oracle.connect(lConnectString) >>> cursor = lConnection.cursor