Boolean data type in VS 2005
Posted: Tue 12 Sep 2006 16:12
Hi,
I have a stored procedure that has IN parameters of type "boolean" or "tinyint(1)". (I say "or" because I have tried this with both types of declarations)
I am using VS Studio 2005. I create a table adapter using the Table Adapter Wizard, and it sets the parameters as datatype "tinyint".
When I try to call the stored procedure through the table adapter in code, I pass it a boolean value, true or false. This gives me an ASP error:
Out of range value adjusted for column 'MyColumnName' at row 1
If I pass it a 0 or 1 it works. Is there a way to pass it true or false though? I would prefer that my code is not database dependent.
Thanks!
I have a stored procedure that has IN parameters of type "boolean" or "tinyint(1)". (I say "or" because I have tried this with both types of declarations)
I am using VS Studio 2005. I create a table adapter using the Table Adapter Wizard, and it sets the parameters as datatype "tinyint".
When I try to call the stored procedure through the table adapter in code, I pass it a boolean value, true or false. This gives me an ASP error:
Out of range value adjusted for column 'MyColumnName' at row 1
If I pass it a 0 or 1 it works. Is there a way to pass it true or false though? I would prefer that my code is not database dependent.
Thanks!