Can you modify the data in a TableDifference?

StuMStuM Posts: 7
I'm developing an app to synchronise two databases but want to replace certain values in the source database before they sync. I tried updating some entries in the Values array in a TableDifferences.ResultsStore.Row which during debugging appeared to take effect but the resulting SQL still used the old value.

Is this possible? My only other options would be to update the source database separately before the comparison or modify and execute the SQL from the ExecutionBlock but was really hoping I could do it as part of the synchronisation itself.

Thanks

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello,

    I can't find any evidence that we support manipulating the results stores with an eye to changing the data before synchronizing it. My guess is that since data sets tend to be mega-huge and and the SQL Data Compare Engine caches them on disk, your changes to the results store objects in memory probably don't get persisted back to the cache on disk.

    The API was designed to synchronize one data source to another - if you have a specific requirement you're trying to fulfill, maybe we have another tool that would provide a better solution to the problem.
  • Hi Brian,

    Thanks for the reply - I saw it at the time and I wasn't aware of the disk usage so that all makes sense.

    For anyone interested I worked around it by searching for the data in the source data myself (I originally used the API for this looking for In1 differences but I needed to take into account tables that might not yet exist in the target too which the API skipped), replace the data in source, perform the sync, then revert the data in source.
Sign In or Register to comment.