Does anyone know this error :
Syntax error (missing operator) in query expression 'Budy Soleman' <--( this is content of textbox.text)
This is my code in VB.net with ms-access
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call connect()
Dim simpan As String
simpan = "insert into mst_karyawan values(" & TextBox8.Text & "," & TextBox2.Text & "," & _
TextBox1.Text & "," & ComboBox1.SelectedValue.item(0) & "," & ComboBox2.SelectedValue.item(0) & "," & _
TextBox5.Text & "," & ComboBox3.SelectedValue.item(0) & "," & ComboBox4.SelectedValue.item(0) & "," & _
ComboBox5.SelectedValue.item(0) & "," & TextBox10.Text & "," & TextBox3.Text & "," & TextBox4.Text & "," & _
TextBox6.Text & "," & DateTimePicker1.Value & "," & TextBox7.Text & ")"
Dim CMD As New OleDb.OleDbCommand(simpan, CONN)
CMD.Parameters.AddWithValue("@NIK", Me.TextBox8.Text)
CMD.Parameters.AddWithValue("@Nama", Me.TextBox2.Text)
CMD.Parameters.AddWithValue("@Alamat", Me.TextBox1.Text)
CMD.Parameters.AddWithValue("@JKid", Me.ComboBox1.SelectedValue.item(1).ToString)
CMD.Parameters.AddWithValue("@Darahid", Me.ComboBox2.SelectedValue.item(1).ToString)
CMD.Parameters.AddWithValue("@Didikid", Me.TextBox5.Text)
CMD.Parameters.AddWithValue("@Statid", Me.ComboBox3.SelectedValue.item(1).ToString)
CMD.Parameters.AddWithValue("@Agamaid", Me.ComboBox4.SelectedValue.item(1).ToString)
CMD.Parameters.AddWithValue("@Kdbagian", Me.ComboBox5.SelectedValue.item(1).ToString)
CMD.Parameters.AddWithValue("@Jabatan", Me.TextBox10.Text)
CMD.Parameters.AddWithValue("@Tlp", Me.TextBox3.Text)
CMD.Parameters.AddWithValue("@HP", Me.TextBox4.Text)
CMD.Parameters.AddWithValue("@Spouse", Me.TextBox6.Text)
CMD.Parameters.AddWithValue("@Anak", Me.TextBox7.Text)
CMD.Parameters.AddWithValue("@Tglmasuk", Me.DateTimePicker1.Value.ToShortDateString())
Call connect()
CMD.ExecuteNonQuery() **<---- Error message point this step as an error **
End Sub