Ticket #1412: ado_mssql.diff

File ado_mssql.diff, 907 bytes (added by kent37@…, 19 years ago)

Patch

  • django/core/db/backends/ado_mssql.py

     
    2727class Connection(Database.Connection):
    2828    def cursor(self):
    2929        return Cursor(self)
     30
     31# Patch adodbapi to use our connection. It's patched two places because
     32# adodbapi.__init__ promotes adodbapi.adodbapi.Connection to package scope
    3033Database.Connection = Connection
     34Database.adodbapi.Connection = Connection
    3135
    3236origCVtoP = Database.convertVariantToPython
    3337def variantToPython(variant, adType):
     
    4347        return int(res) # If float but int, then int.
    4448    return res
    4549Database.convertVariantToPython = variantToPython
     50Database.adodbapi.convertVariantToPython = variantToPython
    4651
    4752class DatabaseWrapper:
    4853    def __init__(self):
Back to Top