#15994: db VariableWrapper not compatible with cursor.callproc
---------------------+----------------------------------------------
 Reporter:  mischko  |          Owner:  nobody
     Type:  Bug      |         Status:  new
Milestone:           |      Component:  Database layer (models, ORM)
  Version:  1.3      |       Severity:  Normal
 Keywords:           |   Triage Stage:  Unreviewed
Has patch:  0        |  Easy pickings:  0
---------------------+----------------------------------------------
 db/backends/oracle/base.py:class VariableWrapper

 1. from django.db import connection
 2. ora_c = connection.cursor()
 3. bar = 'asdf'
 4. foo = ora_c.var(cx_Oracle.NUMBER)
 5. ora_c.callproc("MY_PKG.MY_SP",[bar, foo])

 Gives me an error:

 Request Method:         POST
 Request URL:    http://.....
 Django Version:         1.3
 Exception Type:         NotSupportedError
 Exception Value:        Variable_TypeByValue(): unhandled data type
 VariableWrapper

 So it appears that this is a backward-incompatible change in the upgrade
 from 1.1 (to 1.2) that is not documented?

 The fix for this is to change line 4 to be:
 foo = ora_c.var(cx_Oracle.NUMBER).var

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15994>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to