MS-SQL column of bit datatype... what to provide?

24 views
Skip to first unread message

metaperl

unread,
Feb 15, 2007, 1:34:17 PM2/15/07
to sqlalchemy
In my MS SQL 2005 database schema, the field "RRates" is a bit field.
I have tried to supply False, both as a string and a Python boolean
and neither seems to create an acceptable SQL insert statement.

dat = dict(
RRates = 0, # 0, "0", False, "False" all dont work
)


ke_contracts.insert().execute(dat)

Rick Morrison

unread,
Feb 15, 2007, 2:53:49 PM2/15/07
to sqlal...@googlegroups.com
Bit == Boolean for MS-SQL, so use True/False.

I have tested bit fields with pymssql inserts/updates/deletes and they work fine. If you're using adodbapi, perhaps someone else on the list can try a quick test, as I don't have a working adodbapi setup right now.

Rick
Reply all
Reply to author
Forward
0 new messages