tags:

views:

37

answers:

2

Hello, I'm developping a sync solution enables filtering but is there any way to load the changes form the source database into a dataset and mark the deleted or updated rows to transfer this dataset to client and update its data? thanks.

+1  A: 

May I recommend that you use the Microsoft Sync Framework for this? You will save yourself gobs of time and frustration.

Jay
Microsoft Sync Framework is greate but it does not allow filtering even if I use a custom provider because in my scenariro I want to sync a sub set of the data on the server with a client and vice versa sync framework depends on primary key only wich not acceptable here because when deleting or updating rows these rows may deletetd for another user in the source database the primary key in the client will not be the same as the server
mohamed hadad
+1  A: 

You seem to be looking for classic DataSets with DataAdapters.

SLaks
yes but I want to load data ion this dataset already maarked as deleted or updated and with my custom delete and insert command I will meet the logic
mohamed hadad
You can do that too; use the `RowState` property.
SLaks
Yes I know but I want to select the changes as xml and populate the dataset so the RowState will return if the row is deleted or inserted etc. Can I do that befor populate the dataset I don't want to loop over the datatable to set the rowstate I want to do that before populating
mohamed hadad
No, you cannot.
SLaks