Code:
Try
'I open the connection
Dim Path As String = DB_Folder & "\mydbase.mdb"
Dim DBconn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Path)
DBconn.Open()
Dim da As New OleDbDataAdapter("Select * From HH", DBconn)
Dim ds As New DataSet
Dim dt As New DataTable
da.Fill(ds, "HH")
dt = ds.Tables("HH")
'I must declare or the Rows.Find method don't works
dt.PrimaryKey = New DataColumn() {dt.Columns("Nome")}
Dim FoundRow As DataRow
FoundRow = dt.Rows.Find(SearchName)
If FoundRow Is Nothing Then MessageBox.......
FoundRow.BeginEdit()
FoundRow(2) = "John"
FoundRow(4) = "Adam"
FoundRow.EndEdit()
'FoundRow.AcceptChanges() 'nothing changes if I take off
'dt.AcceptChanges() 'nothing changes if I take off
'ds.AcceptChanges() 'nothing changes if I take off
Dim DBcommand As New OleDbCommandBuilder(da)
da.Update(dt)
'da.Update(dt, "HH") 'nothing changes
'da.Update(ds) 'nothing changes
'da.Update(ds, "HH") 'nothingchanges
DBconn.Close()
Catch...........
If I stop the code and I control the dt content I can see that tha values are changed... but da.Update don't works...:confused:
What is wrong in the code??
Ty