3
I am developing a VB registration system and need help to record the information of a CheckBox
in the SQL Server database.
The column is in bit
in the database, I don’t 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
Take a look at [tour]. You can accept an answer if it solved your problem. You can vote on every post on the site as well. Did any help you more? You need something to be improved?
– Maniero