Make mssql dbapi module selectable

Issue #419 resolved
Former user created an issue

Not a bug report, but a feature addition.

mssql chooses adodbapi as its dbapi module if it's installed, and falls back to pymssql only if adodbapi is not importable. The two behave differently in significant ways. The attached patch adds module-level functions "use_adodbapi" and "use_pymssql" to allow the user to choose one of the two at runtime.

In addition, I've added "use_pyodbc" to use pyodbc as an (experimental) backend - so far, it seems to work pretty well out of the box (as far as I can tell, given that most of the test suite fails on mssql anyway).

Comments (4)

  1. paj
    • removed status
    • changed status to open

    This has introduced a bug in that the adodbapi-specific code in MSNVarchar and MSUnicode is no longer reached. Here is a patch to fix that issue.

  2. Log in to comment