I have the folloing code using OleDB to manipulate an Access database:
Dim adpMasterRecipe As OleDb.OleDbDataAdapter
Dim dsMasterRecipe As New System.Data.DataSet
adpMasterRecipe = New OleDb.OleDbDataAdapter("SELECT * FROM tblMasterRecipe WHERE MasterID = @MasterID", My.Settings.RecipesConnectionString)
adpMasterRecipe.SelectCommand.Parameters.AddWithValue("@MasterID", iRecipeNumber)
adpMasterRecipe.Fill(dsMasterRecipe)
If dsMasterRecipe.Tables(0).Rows.Count > 0 Then
dsMasterRecipe.Tables(0).Rows(0).Delete()
dsMasterRecipe.AcceptChanges()
adpMasterRecipe.Update(dsMasterRecipe)
End If
The problem is that the row is not actually removed from the actual database...