title: Insert into syntax wrong
body: <p>i want to add new user into the access database using vb but it keeps saying wrong insert into syntax when i execute it. can anybody tell me whats wrong with it? ive searched for the mistakes and i think the code is not wrong. help me please</p>
  
  <pre><code>Imports System.IO
  Imports System.Data.OleDb
  
  Public Class Adduser
  Private Sub createbtn_Click(sender As Object, e As EventArgs) Handles createbtn.Click
      If required() = True Then
          Return
      End If
  
  
      Dim connection As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\Gio\Documents\Visual Studio 2012\Projects\CSS\CSS\bin\Debug\CSS.accdb;")
      Try
          If connection.State = ConnectionState.Closed Then connection.Open()
  
          Dim sql As String = "insert into User(Names,Username,Password,isAdmin) values (@Names, @Username, @Password, False)"
          Dim command As OleDbCommand = New OleDbCommand(sql, connection)
  
          Dim isAdmin As Boolean
  
          Dim Names As OleDbParameter = New OleDbParameter("@Names", OleDbType.VarWChar, 50)
          Names.Value = namebox.Text.ToString()
          command.Parameters.Add(Names)
  
          Dim Username As OleDbParameter = New OleDbParameter("@Username", OleDbType.VarWChar, 50)
          Username.Value = unamebox.Text.ToString()
          command.Parameters.Add(Username)
  
          Dim Password As OleDbParameter = New OleDbParameter("@Password", OleDbType.VarWChar, 50)
          Password.Value = namebox.Text.ToString()
          command.Parameters.Add(Password)
  
          command.Parameters.AddWithValue("@isAdmin", isAdmin)
          isAdmin = False
  
          If command.ExecuteNonQuery() Then
              connection.Close()
              MessageBox.Show("New user is added!")
              namebox.Text = ""
              unamebox.Text = ""
              passbox.Text = ""
  
          Else
              MsgBox("Addition of new user failed!")
          End If
  
      Catch ex As Exception
          MessageBox.Show(ex.Message.ToString(), "Data Error")
          Exit Sub
      End Try
  End Sub
  </code></pre>