P
Parsley
Hi All
I'm experiencing the problem of dataset.getchanges
returning unmodified rows only :
myDs.ReadXml("c:\Parsley.xml", xmlReadMode.Auto)
For Each t In myDs.Tables
For Each r In t.Rows
If r.Item("Deleted").ToString = "True" Then
r.Delete()
Exit For
End If
Next r
Next t
myTmpDs = myDs.GetChanges()
myDs.Merge(myTmpDs)
myDs.WriteXml("c:\Parsley.xml", xmlWriteMode.WriteSchema)
The getchanges call returns the non deleted rows, the
merge call adds these rows to the main dataset. I have
read elsewhere that I need a primary key? There is one on
the SQL table the xml is extracted from but nothing in the
xml to indicate this.
Ta v'ry much
Parsley
I'm experiencing the problem of dataset.getchanges
returning unmodified rows only :
myDs.ReadXml("c:\Parsley.xml", xmlReadMode.Auto)
For Each t In myDs.Tables
For Each r In t.Rows
If r.Item("Deleted").ToString = "True" Then
r.Delete()
Exit For
End If
Next r
Next t
myTmpDs = myDs.GetChanges()
myDs.Merge(myTmpDs)
myDs.WriteXml("c:\Parsley.xml", xmlWriteMode.WriteSchema)
The getchanges call returns the non deleted rows, the
merge call adds these rows to the main dataset. I have
read elsewhere that I need a primary key? There is one on
the SQL table the xml is extracted from but nothing in the
xml to indicate this.
Ta v'ry much
Parsley