The bit data type is simple - and yet, it gets kind of tricky.
In short - this datatype can be set to 0 or 1.
Two things complicate this:
- It can also be set to null
- Many programming languages will set this to true/false
Consequently - it’s pretty easy to fall into some traps.
Here are a few
asp.net sample - populating a checkbox based on a bit field
1 | ds = dl_db.DS_Fetch(str, "ConnectionString") |