views:

32

answers:

1

I am getting an error msg when attempting to update a record from asp.net into a SQL database. The only boolean value being updated is:

cmdAddUser.Parameters.Add(new SqlParameter("@Active", SqlDbType.Bit));
cmdAddUser.Parameters["@Active"].Value = 
    Convert.ToBoolean(cbAddUserActiveUser.Checked);

The datatype for @Active in the database is "bit". Any ideas?

+1  A: 

Long shot - have you got another parameter that is set as a string but is a bit column in the actual table?

harriyott
Good answer. I am modifying this proc that has about 24 paramters.
user279521