robert123321
Gebruiker
- Lid geworden
- 5 okt 2007
- Berichten
- 46
Ik probeer in een tabel een regel bij te schrijven maar krijg de volgende foutmelding:
"De instructie INSERT bevat een syntaxisfout."
Rode tekst is waar het mis gaat.
Iemand misschien een oplossing?
"De instructie INSERT bevat een syntaxisfout."
Rode tekst is waar het mis gaat.
Iemand misschien een oplossing?
Code:
sqlQRY = "SELECT * FROM tblApplications"
Dim da1 As OleDbDataAdapter = New OleDbDataAdapter(sqlQRY, conn)
' create command builder tblApplications
Dim cb1 As OleDbCommandBuilder = New OleDbCommandBuilder(da1)
' create dataset tblApplications
Dim ds1 As DataSet = New DataSet
' fill dataset tblApplications
da1.Fill(ds1, "tblApplications")
' get data table tblApplications
Dim dt1 As DataTable = ds1.Tables("tblApplications")
' add new row
Dim newRow As DataRow = dt1.NewRow()
newRow("AppID") = AppId
newRow("Date") = Now.Date
dt1.Rows.Add(newRow)
'update table
cb1.GetUpdateCommand()
[COLOR="red"]da1.Update(ds1, "tblApplications")[/COLOR]