Difference list doesn't work
njansen
Posts: 6
I'm building a tool to sync a specific list of objects
For each object i want to sync i'll set the Difference.Selected property to true, for all other objects i don't want to sync, i'll set the Difference.Selected property to false.
After that, i'll call the Work.BuildFromDifferences method;
Work.BuildFromDifferences(Differences, Options.Default, true);
Why do i see objects where the Difference.Selected prop is set the false?
For each object i want to sync i'll set the Difference.Selected property to true, for all other objects i don't want to sync, i'll set the Difference.Selected property to false.
After that, i'll call the Work.BuildFromDifferences method;
Work.BuildFromDifferences(Differences, Options.Default, true);
Why do i see objects where the Difference.Selected prop is set the false?
Comments
Failing that, can you post back a code sample of how you've got it set up and details of the assembly versions you're referencing so I can try it out here?
Redgate Software
I'm trying to synchronise a list of table valued functions.
Here's a code fragment (in C#);
options.default
with
options.IgnoreFileGroups | options.IgnoreFillFactor | options.IgnoreUserProperties | options.IgnoreWhiteSpace | options.IgnoreWithElementOrder | options.IgnoreDatabaseNames | options.DecryptPost2kEncryptedObjects
Redgate Software
I still receive a script with objects i don't want.
for example, the script want's to drop constraints on tables;
ALTER TABLE [dbo].[AGMG] DROP CONSTRAINT [PK_AGMG]
As you can see in the code fragment, I only select functions which start with a specific name.
Is it possible for you to supply your snapshot as the problem you're seeing is likely to be rather dependent on the specifics of your DB. If so, please mail it to support@red-gate.com quoting F0067161 in the subject line.
Redgate Software
Redgate Software
Amending the options as I described earlier stops that - here's the correct line (notice it's the options at the point of building your 'work' that's important as the dependencies are included (or not) during the sync phase usually)
Redgate Software
Redgate Software
I have the same problem and i Need to exclude dependecies from the difference list.
So as described in the post I have added the list of options
work.BuildFromDifferences(differences, Options.IgnoreUserProperties | Options.IgnoreWhiteSpace | Options.IgnoreWithElementOrder | Options.IgnoreDatabaseAndServerName | Options.DecryptPost2kEncryptedObjects, true);
But when I go to compile the project I got this error.
Operator '|' cannot be applied to operands of type ' RedGate.SQLCompare.Engine.Options' and 'RedGate.SQLCompare.Engine.Options'
Any Idea on how to solve?
I'm Using Visual Studio 2013 and SQL Comparison SDK 10.5
Thanks