Here is the error: http://screencast.com/t/ZDVhNmJiOTgt
Please help, here is my code: what can I do to solve this error
Try
If MessageBox.Show("Save and update database?", _
"Confirmation", MessageBoxButtons.YesNo) = _
Windows.Forms.DialogResult.Yes Then
Dim idXs As Integer
Dim dSet As New DataSet
Dim conn As New OleDb.OleDbConnection
Dim strSQL As String
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\ACCESS DATABASE\search.mdb"
conn.Open()
strSQL = "Select * From GH"
Dim da As OleDbDataAdapter
da = New OleDb.OleDbDataAdapter(strSQL, conn)
da.Fill(dSet, "GH") 'fill dataset
'code for editing records
Dim cb As New OleDbCommandBuilder(da)
idXs = Form1.idX 'retrieve index from Form1
dSet.Tables("GH").Rows(idXs).Item(0) = TextBox1.Text
dSet.Tables("GH").Rows(idXs).Item(1) = TextBox2.Text
dSet.Tables("GH").Rows(idXs).Item(2) = TextBox3.Text
dSet.Tables("GH").Rows(idXs).Item(3) = TextBox4.Text
da.Update(dSet, "GH") 'update database
conn.Close() 'close connection
reloadMyMain() 'show new changes in form1 if any
Else
DSET.RejectChanges() 'cancel delete
End If
Catch ex As Exception
MsgBox(ex.ToString) 'show exception message
End Try