I am developing a registry system in VB and need help writing the CheckBox
information to the SQL Server database.
The column is in bit
in the database, I do not know how to pass the parameter so that the user's choice is saved in the database.
In the case of Nchar
use the following parameter:
.Parameters.Add(New SqlParameter("@Nome", SqlDbType.Nchar)).Value = txtNome.Text
But in the case of bit
I'm doing something wrong:
.Parameters.Add(New SqlParameter("@Ativo", SqlDbType.bit)).Value = chbAtivo.Checked