Friends,
I'm in need of an implementation which calls for using bind variables (in
Oracle sense, not generic) in my SQL in a Django application.
Any experience with that, anyone?
Here's an example using bind variables to return output values from a
PL/SQL block.
>>> import cx_Oracle
>>> from django.db import connection
>>> cursor = connection.cursor()
>>> lOutput = cursor.var(cx_Oracle.STRING)
>>> cursor.execute("BEGIN %s := 'N'; END; ", [lOutput])
>>> print lOutput
<cx_Oracle.STRING with value None>
>>> print lOutput.getvalue()
None
>>>
There was a bug in Django that prevented this working (hence the None in
the code above) - it's fixed in Django 1.2. The full thread for this is
at http://www.mail-archive.com/django-users@googlegroups.com/msg100490.html
Hope that will help send you in the right direction.
Tim.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.