[Zope-Checkins] CVS: Products/DCOracle2/DCOracle2 - DCOracle2.py:1.99
Matthew T. Kromer
matt@zope.com
Wed, 5 Feb 2003 10:19:33 -0500
Update of /cvs-repository/Products/DCOracle2/DCOracle2
In directory cvs.zope.org:/tmp/cvs-serv15532/DCOracle2
Modified Files:
DCOracle2.py
Log Message:
Add SQLT_VNU support to OUT bindings for stored procedures to help Oracle
figure out overloaded procedure bindings.
=== Products/DCOracle2/DCOracle2/DCOracle2.py 1.98 => 1.99 ===
--- Products/DCOracle2/DCOracle2/DCOracle2.py:1.98 Fri Oct 25 10:49:27 2002
+++ Products/DCOracle2/DCOracle2/DCOracle2.py Wed Feb 5 10:19:31 2003
@@ -129,6 +129,8 @@
DEFAULTPROCSIZE=256
DEFAULTPROCCOUNT=256
+NativeNumeric = version.find('NATIVENUMERIC=1') > 0
+
DateConversion = None
# For the next() idiom which is Python 2.2, there is no StopIteration in
@@ -1419,6 +1421,9 @@
else:
alist = ""
+ # Note: If we were clever, we might put in extra lines in the
+ # statement, so that "error on line 1" would be more specific about
+ # which parameter was having problems.
sql = "BEGIN %s %s(%s); END;" % (fcn, n, alist)
#print sql
@@ -1476,8 +1481,11 @@
l = 4 # Was 38 ? harumph
elif dty == 2 and 'IN' not in thisargMode:
# SQLT_NUM but not IN OUT
- dty = 'SQLT_STR'
- argconvert[i] = 2
+ if NativeNumeric:
+ dty = 'SQLT_VNU'
+ else:
+ dty = 'SQLT_STR'
+ argconvert[i] = 2
#print "Creating new BindingArray of size %s, type %s" % (l, dty)
ba = cursor._connection.BindingArray(count, l, dty)