[Zope-Checkins] CVS: Products/DCOracle2/DCOracle2 - DCOracle2.py:1.101

Matthew T. Kromer matt@zope.com
Mon, 3 Mar 2003 09:58:59 -0500


Update of /cvs-repository/Products/DCOracle2/DCOracle2
In directory cvs.zope.org:/tmp/cvs-serv32372/DCOracle2

Modified Files:
	DCOracle2.py 
Log Message:
Add fix from tracker issue 92


=== Products/DCOracle2/DCOracle2/DCOracle2.py 1.100 => 1.101 ===
--- Products/DCOracle2/DCOracle2/DCOracle2.py:1.100	Thu Feb 13 19:01:19 2003
+++ Products/DCOracle2/DCOracle2/DCOracle2.py	Mon Mar  3 09:58:22 2003
@@ -1493,6 +1493,7 @@
                     # SQLT_NUM but not IN OUT
                     if NativeNumeric:
                         dty = 'SQLT_VNU'
+                        l = 23
                     else:
                         dty = 'SQLT_STR'
                         argconvert[i] = 2
@@ -1500,8 +1501,8 @@
                 #print "Creating new BindingArray of size %s, type %s" % (l, dty)
                 ba = cursor._connection.BindingArray(count, l, dty)
 
-                #ba.setStatic(1) # XXX for testing only (OUT BA's must grow!)
-                                  
+                #if count == 1:
+                #    ba.setStatic(1) # XXX for testing only (OUT BA's must grow!)
                 olda = thisargValue
                 a[0] = ba  # Swap in our new binding array for the output
 
@@ -1708,6 +1709,9 @@
             LONG = "long"
             FLOAT = "float"
             for i in xrange(len(ba)):
+                if ba[i] is None:
+                    oba[i] = None
+                    continue
                 f = float(ba[i])
                 l = long(f)
                 try:
@@ -1729,6 +1733,7 @@
             # Try to clean up if we detected a more 'restrictive' type
             if twopass:
                 for i in xrange(len(oba)):
+                    if oba[i] is None: continue
                     if force is FLOAT:
                         oba[i] = float(ba[i])
                     elif force is LONG: