booleans dont work in MS-SQL

Issue #228 resolved
Mike Bayer repo owner created an issue

if you have BOOLEAN and set a bind parameter to True/False using pymssql, you get an internal error.

Comments (6)

  1. Former user Account Deleted

    two methods to add to SLBoolean (and possibly MSBoolean) class to fix broken boolean handling code.

  2. Former user Account Deleted

    this problem exists in sqlite.py as well. both sqlite and mssql store True/False as 1/0. i fixed this by adding two methods to the SLBoolean (or MSBoolean) classes (attached).

    i don't know SQLAlchemy well enough to determine if this is an acceptable fix or not, but it works for me for now. there should probably be a common class for booleans that are represented as integers, which is subclassed for the different databases.

  3. Log in to comment