Cannot enter a 0 or 1 in a BIT datatype

johncassell

Well-known member
Joined
Jun 10, 2007
Messages
120
Location
Redcar, England
Programming Experience
Beginner
Hi there,

I have an SQL Server Express 2005 database with a column (Hire_Ticked) in it with a datatype of BIT. All i want from it is basic "yes/no", "true/false" data entry so I thought BIT was best datatype.

Even though it says BIT can only accept 0 or 1, if I enter either of those it comes up with the error below..

Any ideas?

Thanks

John
 

Attachments

  • sqlBITerror.JPG
    sqlBITerror.JPG
    25.2 KB · Views: 35
Via code you can use values 1 or 0, but when changing the value manually like you are doing, use True or False.
 
Back
Top