Hi All,I am coidng a movie database using vb.ebt (VS 2013) and using access (2013) I am trying to code my save button, but every time i run the program and try to save my data I get the below error
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll
Additional information: Syntax error in INSERT INTO statement.
here is my code:
If inc <> -1 Then
Dim cb As New OleDb.OleDbCommandBuilder(da)
Dim dsnewrow As DataRow
dsnewrow = ds.Tables("Films").NewRow()
dsnewrow.Item("Title") = txtTitle.Text
dsnewrow.Item("Director") = txtDirector.Text
dsnewrow.Item("Certificate") = cmbCertificate.Text
dsnewrow.Item("Genre") = cmbGenre.Text
dsnewrow.Item("Date") = dpDate.Text
dsnewrow.Item("IMDB Link") = txtIMDB.Text
dsnewrow.Item("Youtube Link") = txtYotube.Text
ds.Tables("Films").Rows.Add(dsnewrow)
da.Update(ds, "Films") 'this is where the error is
NavigateRecords()
MessageBox.Show("Record Added to Database")
End If
Any help will be appreciated.
PS new to VB, so please go easy
Thanks