Hi Peter,
thanks for your answer. Actually I need the other way around. The client
does not modify the dataset. I would like just to subscribe to the changes,
which come from the server.
So the client stores the cache (store dataset as xml) and is disconnected
for long time. I would like to load the cache on the client and just
received the changes from the server.
Any thought?
Thanks in advance
Anthony
--
Anthony Malt
"Peter Kelcey" <Pe**********@telus.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Anthony
One thing you can look at is the getchanges method of your dataset. You
can use it to perform the following steps
1) Retrieve the dataset from the server
2) The client modifies the dataset
3) The client submits only the changed rows
4) The server merges the changed rows into its dataset
5) The server accepts the new changes on the dataset
Here is some sample code that would do this.
//retrieve the dataset from your service
Dim dsClientSide As DataSet = YourWebService.GetData()
//Modify the ds
ModifyDataSetContents(dsMain)
//Send back the changes
Dim dsModifiedRows As DataSet = dsClientSide.GetChanges()
objWebService.SubmitChanges(dsModifiedRows)
//Back in the service, merge the recieved changes back into the
server's own copy of the ds
dsServerSide.Merge(dsChanges)
dsServerSide.AcceptChanges()
Note, in order for the merge method to work, your dataset needs to have
a PrimaryKey property set.
Hope that helps
Peter Kelcey