I am trying to populate an MS Access table using VB.Net through a connection string everything else seems to work except when I try to add a new row.
I get this error:
OleDbException was unhandled
Syntax error in INSERT INTO statement
Here is the code
[Dim MaxRows As Integer
Dim con As New OleDb.OleDbConnection
Dim sql As String
Dim ds As New DataSet
Dim inc As Integer
Dim da As OleDb.OleDbDataAdapter
'the add Button code:
Dim cb As New OleDb.OleDbCommandBuilder(da)
Dim NewRow As DataRow
NewRow = ds.Tables("a").NewRow()
NewRow.Item(0) = ""
NewRow.Item(1) = ""
NewRow.Item(2) = ""
NewRow.Item(3) = Date.Today
'Dim contnue As Boolean
ds.Tables("a").Rows.Add(NewRow)
da.Update(ds, "a")