[DB-SIG] adodbapi and cvtMoney

William Dode wilk-ml at flibuste.net
Wed Nov 30 11:39:59 CET 2005


In adodbapi there is a cvtMoney function with decimal=2
def cvtMoney((hi, lo), decimal=2):
    TWO32 = 2L ** 32
    if lo < 0:
        lo += TWO32
    return round((float((long(hi) << 32) + lo))/10000.0,decimal)

I have a MSAccess table with a money field with more decimals, so i had
to hack the cvtMoney function to can get theses decimals.

Is it a bug of adodbapi or a bug in the database definition ?

William Dodé - http://flibuste.net

More information about the DB-SIG mailing list