What are the challenges you face when working across database platforms? Take the survey
Options

"Object reference not set to an instance of an object."

PhilnPhiln Posts: 11
Hi,
I am not sure what am I missing when run the following code..
(note- I copied almost exactly as the same as in the the code sample)
The error happen on the line "work.BuildFromDifferences(diffs, Options.Default, true);"

...
TableMappings mappings = new TableMappings();
mappings.CreateMappings(srcDB.Tables, destDB.Tables);
mappings.Options = new EngineDataCompareOptions(
MappingOptions.Default,
ComparisonOptions.TrimTrailingSpaces | ComparisonOptions.Default,
SqlOptions.Default);
Differences diffs = srcDB.CompareWith(destDB, Options.Default);
foreach (Difference diff in diffs)
{
diff.Selected = true;
}
Work work = new Work();
work.BuildFromDifferences(diffs, Options.Default, true);
//Perform sync
ExecutionBlock block = work.ExecutionBlock;
BlockExecutor executor = new BlockExecutor();
philn

Comments

Sign In or Register to comment.