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

BuildFromDifferences

rbaudischrbaudisch Posts: 2
edited March 20, 2007 4:17PM in SQL Compare Previous Versions
I am creating a WinForms UI to allow the user to select the difference items that they want to synchronize. I then call the following method to build the work item from the selected differences. But work.BuildFromDifferences throws a NullReferenceException. I have checked the differences object and it seems to be all there. What is missing ?

using RedGate.SQL.Shared;
using RedGate.SQLCompare.Engine;

public static void SynchronizeDatabases(Differences differences)
{
Work work = new Work();
work.BuildFromDifferences(differences, Options.Default, true);
...
}


Thanks in advance,
Rich B.


It turns out that I was calling Dispose() on the DB objects prior to running SynchronizeDatabases. I now call Dispose() after the Sync and all is well :D
Sign In or Register to comment.