T
Tupolev
Hi,
I have a strang problem with a form that have 5 tabpages and on each
page there is a datagrid. The problem: I can't get the getchanges work
(although on other forms it works fine) ! It seems that when I change from
tabpage, the datagrid does an accepthanges so there are no visible changes
made on the data. Sometimes however (when I change +- 3 times from tabpage)
it starts working. When someone know what is wrong, please respond.
Private allerleiadapter As Data.OleDb.OleDbDataAdapter
Private allerleidataset As New DataSet()
on formload:
sql = "Select * from Prijslijsten Where Prijslijsten.groep = 'allerlei'"
allerleiadapter = New OleDb.OleDbDataAdapter(sql, connection1)
allerleiadapter.Fill(allerleidataset, "allerlei")
DGallerlei.DataSource = allerleidataset
DGallerlei.DataMember = "allerlei"
allerlei.MappingName = "allerlei"
than in a private sub:
Dim deletedrows As New DataTable()
Dim updatedrows As New DataTable()
deletedrows = dataset1.Tables(0).GetChanges(DataRowState.Deleted)
updatedrows = dataset1.Tables(0).GetChanges(DataRowState.Modified)
Tupolev
I have a strang problem with a form that have 5 tabpages and on each
page there is a datagrid. The problem: I can't get the getchanges work
(although on other forms it works fine) ! It seems that when I change from
tabpage, the datagrid does an accepthanges so there are no visible changes
made on the data. Sometimes however (when I change +- 3 times from tabpage)
it starts working. When someone know what is wrong, please respond.
Private allerleiadapter As Data.OleDb.OleDbDataAdapter
Private allerleidataset As New DataSet()
on formload:
sql = "Select * from Prijslijsten Where Prijslijsten.groep = 'allerlei'"
allerleiadapter = New OleDb.OleDbDataAdapter(sql, connection1)
allerleiadapter.Fill(allerleidataset, "allerlei")
DGallerlei.DataSource = allerleidataset
DGallerlei.DataMember = "allerlei"
allerlei.MappingName = "allerlei"
than in a private sub:
Dim deletedrows As New DataTable()
Dim updatedrows As New DataTable()
deletedrows = dataset1.Tables(0).GetChanges(DataRowState.Deleted)
updatedrows = dataset1.Tables(0).GetChanges(DataRowState.Modified)
Tupolev