Think I've found it in the line
cmdStr = "Update Table22 SET isLocked = true where EmailAddress = @TextBoxEA";
There isn't a Boolean column type per se in SQL - you need to use
a) (best way)
BIT
and set the value to 1 if True or 0 if False
cmdStr = "Update Table22 SET isLocked = 1 where EmailAddress = @TextBoxEA";
OR b)
CHAR(1)
and set the value to 'Y' if True or 'N' if False
cmdStr = "Update Table22 SET isLocked = 'Y' where EmailAddress = @TextBoxEA";
OR c) (Don't do this)
VARCHAR(5)
and set the value to 'True' or 'False'
cmdStr = "Update Table22 SET isLocked = 'True' where EmailAddress = @TextBoxEA";