[solved]boolean datatype?
In my MSSQL table "User" there is a column called "gender", should it be a boolean type? In my database manager datatype list, there is no boolean. I tried to set it as "tinyInt" same as the way i did in Interbase stuff.
In VB.NET, i have new user registration form which contains gender, and i put 2 radioboxes on the form "male" and "female". there is my code to add a user to database, can anyone please help me complete the code by adding the gender radiobox value?
In my MSSQL table "User" there is a column called "gender", should it be a boolean type? In my database manager datatype list, there is no boolean. I tried to set it as "tinyInt" same as the way i did in Interbase stuff.
In VB.NET, i have new user registration form which contains gender, and i put 2 radioboxes on the form "male" and "female". there is my code to add a user to database, can anyone please help me complete the code by adding the gender radiobox value?
VB.NET:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRegister.Click
Try
'add new record into the database
SqlConnectionNUR.Open()
SqlInsertCommand1.Parameters(0).Value = txtUserName.Text
----> SqlInsertCommand1.Parameters(1).Value = ?????????????
SqlInsertCommand1.Parameters(2).Value = txtAge.Text
SqlInsertCommand1.Parameters(3).Value = txtPassword.Text
SqlInsertCommand1.Parameters(4).Value = txtPWQ.Text
SqlInsertCommand1.Parameters(5).Value = txtPWA.Text
SqlInsertCommand1.ExecuteNonQuery()
MessageBox.Show("done!")
Catch eUpdate As System.Exception
System.Windows.Forms.MessageBox.Show(eUpdate.Message)
End Try
End Sub
Last edited: