Reputation: 3
I'm using Visual Studio 2010 and MS Access 2007
I can't fix the error
when debugging, "Syntax error in Insert Into" is occurred but sql syntax is correct I'm new to vb.net and it would be grateful if anyone can give me a solution.
Try
Dim query As String = "INSERT INTO User([ID],[StudName],Address])VALUES('002','haerth','col')"
Dim comLib As New OleDbCommand
With comLib
.CommandText = query
.Connection = conLib
.ExecuteNonQuery()
End With
MessageBox.Show("Added Successfully")
Catch ex As OleDbException
MessageBox.Show(ex.ToString)
End Try
`
Upvotes: 0
Views: 641