[DB-SIG] adodbapi

William Dode wilk-ml@flibuste.net
05 Mar 2003 17:50:41 +0100


hi,

Is the project still alive ?
I submit a patch to correct the error when msaccess return tuple for
currency instead of float.

I also plan to submit a patch to improve speed with getrows like
kevin. Maybe somebody did it ?

-- --- ado/adodbapi/adodbapi.py    2003-03-05 17:20:18.000000000 +0100
+++ adodbapi.py 2003-03-05 17:21:34.000000000 +0100
@@ -22,6 +22,7 @@
 import string
 import exceptions
 import win32com.client
+import types
 
 import mx.DateTime as datelibrary
 # This module uses the following functions of the datelibrary:
@@ -599,6 +600,8 @@
             return datelibrary.DateTimeFromCOMDate(variant)
     if type_code == NUMBER:
         try:
+            if type(variant) == types.TupleType: # msaccess currency
+                return float(variant[1]/10000.0)
             return float(variant)
         except ValueError:
             #A comma is a dot in Sweden, the regional settings are used in the variant


William Dode - http://flibuste.net