&nbsp;<BR>I have a situation in regard to synchronizing a .NET client application data<BR>into the SQL Server over HTTP.<BR><BR>I am using webserivce to pass a Datset that has the schema(XSD) of the<BR>database and the all the changes made from the client offline. This dataset<BR>virtually will represent entire database. The user makes changes to record<BR>in terms of Add,Update and delete in offline mode which is stored in XML<BR>format locally using diffgram mode. Then an event triggers the sync process.<BR><BR>1) Issue is when I do update to a local master/child tables, there are<BR>unique keys generated. In the meantime someone adds the server records, and<BR>if this key is already generated then on calling the dataset.Merge(changes)<BR>method there is a update of the record.<BR><BR>2) The second issue is how do I manage the foreign key constraints in this<BR>scenario. Because on insert I have to make sure that all the FK columns<BR>refer to the PK of the master tables.<BR><BR><BR>Please help me out. Also is there any better way to sync. I would really<BR>appreciate if you could help me on this<BR><BR>Thanks,<BR>VIshnu<BR><BR>