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

Matthew T. Kromer matt@zope.com
Tue, 20 Aug 2002 09:28:37 -0400


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

Modified Files:
	DCOracle2.py 
Log Message:
Modify date conversion routine for Kevin Kalbfleisch


=== Products/DCOracle2/DCOracle2/DCOracle2.py 1.92 => 1.93 ===
--- Products/DCOracle2/DCOracle2/DCOracle2.py:1.92	Mon Jul 15 10:12:51 2002
+++ Products/DCOracle2/DCOracle2/DCOracle2.py	Tue Aug 20 09:28:37 2002
@@ -121,10 +121,11 @@
 DEFAULTPROCSIZE=256
 DEFAULTPROCCOUNT=256
 
-DateConversion = [None,] 
+DateConversion = None 
 
 def registerDateConversion(x):
-    DateConversion[0] = x
+    global DateConversion
+    DateConversion = x
 
 def connect(dsn=None, user=None, password=None, database=None):
 
@@ -1156,8 +1157,8 @@
             if t == dco2.CursorType:
                 v = cursor(v)
                 v.description = v.describe()
-            elif t == dco2.OracleDateType and DateConversion[0]:
-                v = DateConversion[0](v)
+            elif t == dco2.OracleDateType and DateConversion:
+                v = DateConversion(v)
 
             l.append(v)
 
@@ -1450,6 +1451,9 @@
 
                 #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!)
+                                  
                 olda = thisargValue
                 a[0] = ba  # Swap in our new binding array for the output