C
C a r l o s A n t o n i o
Hello,
How can I update a datarow in a typed dataset? It seems i can't make it to
write the changes into the database. What am i doing wrong? Thanks in
advance.
Here's my code:
Private Sub save_changes(ByVal _infraction_id As System.Guid)
Dim o_adapter As New roswellDataSetTableAdapters.infractionsTableAdapter
Dim o_data_table As roswellDataSet.infractionsDataTable
Dim o_row As roswellDataSet.infractionsRow
o_data_table = o_adapter.GetData
o_row = o_data_table.FindByinfraction_id(_infraction_id)
With o_row
..BeginEdit()
.ticket_number = "333"
.EndEdit()
.AcceptChanges()
End With
o_adapter.Update(o_data_table)
o_data_table.AcceptChanges()
End Sub
How can I update a datarow in a typed dataset? It seems i can't make it to
write the changes into the database. What am i doing wrong? Thanks in
advance.
Here's my code:
Private Sub save_changes(ByVal _infraction_id As System.Guid)
Dim o_adapter As New roswellDataSetTableAdapters.infractionsTableAdapter
Dim o_data_table As roswellDataSet.infractionsDataTable
Dim o_row As roswellDataSet.infractionsRow
o_data_table = o_adapter.GetData
o_row = o_data_table.FindByinfraction_id(_infraction_id)
With o_row
..BeginEdit()
.ticket_number = "333"
.EndEdit()
.AcceptChanges()
End With
o_adapter.Update(o_data_table)
o_data_table.AcceptChanges()
End Sub