Good afternoon, guys, I'm trying to make a CRUD here using VB.NET and Access, so when I perform an INSERT it returns the error "Syntax Error in INSERT INTO statement". But I can not solve it .... if you can help me right now, I would appreciate it.
con.open () Dim strCmd As String="INSERT INTO Maps (DataRegistration, NumReference, Local, Respondent, OBS, Status)" & _ "Values (?,?,?,?,?)" Dim cmd As OleDbCommand = New OleDbCommand (strCmd, con) cmd.Parameters.AddWithValue ("?", txtDataRegistration.Text) cmd.Parameters.AddWithValue ("?", txtMap.Text) cmd.Parameters.AddWithValue ("?", txtLocal.Text) cmd.Parameters.AddWithValue ("?", txtResponsavel.Text) cmd.Parameters.AddWithValue ("?", txtObs.Text) cmd.Parameters.AddWithValue ("?", chkStatus.Checked) cmd.ExecuteNonQuery () MsgBox ("Map successfully registered!" & VbCrLf & "Name:" & txtMap.Text, MsgBoxStyle.Information)