none
save the delta script RRS feed

  • Question

  • Hey guys

    I'd like to have Sync Framework compare data on 2 databases & hand me a delta script to save on disk (much like Data Compare in Visual Studio).

    I'm having a hard time finding a way to retrieve the script. I looked at SyncAdapter, ChangeBatch, DbApplyingChangesEventArgs.Context.DataSet & Microsoft.SqlServer.Management.Smo.Table.Script() but the answer doesn't seem to be there.

    Could anyone shed some light on this?

    Thank you

    Amir

     

     

    Friday, November 5, 2010 9:09 PM

All replies

  • unfortunately, Sync Fx doesn't work similar to Data Compare. Sync Fx works on "incremental change tracking" rather than differential (where you tract what is different between two replicas. In Sync Fx, you'll find that it's only synching rows that has change from the last synch.

    If you're using the offline providers, the SQL statements that apply the changes are in the SyncAdapter, if it's the collaboration providers, the stored procs associated with the scope are found in the scope definition.

    You can actually find the actual data changes that were detected in the ChangesSelected event. The event argument will have a dataset that contains the rows that were detected as changes.

    Saturday, November 6, 2010 1:30 PM
    Moderator