I get syntaxis error when I try to debug this piece of code:
Can anyone help me?
error : The instruction INSERT INTO has a syntaxiserror.
Grtzz
VB.NET:
OleDbConnectionNew.Open()
Dim cmd As New OleDb.OleDbCommand("INSERT INTO AccountDetails(AccountDetails.Username, AccountDetails.Surname, AccountDetails.Name, AccountDetails.Street, AccountDetails.Streetnumber, AccountDetails.ZIP code, AccountDetails.City, AccountDetails.Country, AccountDetails.Password, AccountDetails.Secret question, AccountDetails.Secret question answer, AccountDetails.Geactiveerd) VALUES(@Username,@Surname,@Name,@Street,@Streetnumber,@Zip code,@City,@Country,@Password,@Secret question,@Secret question answer,'False')", OleDbConnectionNew)
cmd.Parameters.AddWithValue("@Username", txtUsername.Text)
cmd.Parameters.AddWithValue("@Surname", txtSurname.Text)
cmd.Parameters.AddWithValue("@Name", txtName.Text)
cmd.Parameters.AddWithValue("@Street", txtStreet.Text)
cmd.Parameters.AddWithValue("@Streetnumber", txtStreetNumber.Text)
cmd.Parameters.AddWithValue("@Zip code", txtZipCode.Text)
cmd.Parameters.AddWithValue("@City", txtCity.Text)
cmd.Parameters.AddWithValue("@Country", cboCountry.SelectedItem.ToString)
cmd.Parameters.AddWithValue("@Password", txtPassword.Text)
cmd.Parameters.AddWithValue("@Secret question", cboSecretQuestion.SelectedItem.ToString)
cmd.Parameters.AddWithValue("@Secret question answer", txtSecretQuestionAnswer.Text)
cmd.ExecuteNonQuery()
Can anyone help me?
error : The instruction INSERT INTO has a syntaxiserror.
Grtzz