I'm using
VB.net 2003. I can delete a row in datagrid (dgTempTransaction), but my MS Access table can't directly being updated. The row i deleted is still exist in my MS Access, but in my datagrid, it already being deleted.
The table name in my MS Access: tableTempTransaction.
Here is my code for that part...i don't know where is the error. Please help me..... Thanks anyway.
Dim currManager As CurrencyManager
If IsNothing(DsTempTransaction1) Then Exit Sub
currManager = CType(BindingContext(DsTempTransaction1, "tableTempTransaction"), CurrencyManager)
'get the current row
Dim dRow As DataRow = CType(currManager.Current, DataRowView).Row
'prompt to save changes
If MsgBox("Are you sure want to delete this item?", MsgBoxStyle.OKCancel, "Hands On Programming") = MsgBoxResult.OK Then
'delete it from the dataset
dRow.Delete()
'get just the changed data
Dim dsChanged As DataSet = DsTempTransaction1.GetChanges
'>>>Problem in this part...table inside MS Access cannot be updated.
Else
'reset the dataset
DsTempTransaction1.RejectChanges()
End If