Red Gate forums :: View topic - Alter View difference has Selected=false, but still executes
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Comparison SDK Previous Versions
SQL Comparison SDK Previous Versions forum

Alter View difference has Selected=false, but still executes

Search in SQL Comparison SDK Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
sdwire



Joined: 17 Mar 2009
Posts: 2

PostPosted: Tue Mar 17, 2009 4:47 pm    Post subject: Alter View difference has Selected=false, but still executes Reply with quote

I'm working on a project that has four views defined that access an external database. These are essentially identity views that will never change once installed. I want to exclude these views from the execution script for the differences, even though the name of the external database will be different across different environments.

The solution I have attempted is to iterate the Differences collection and set difference.Selected=false whenever I identify a difference for one of these specific views.

I can confirm with the debugger that the differences for these four views do indeed have Selected=false, but when I generate the ExecutionBlock, the synchronization script still has the code to alter those four views.

How can I prevent these four views from being included in the synchronization script?
Back to top
View user's profile Send private message
Michelle Taylor



Joined: 30 Oct 2006
Posts: 525
Location: Red Gate Software

PostPosted: Tue Mar 17, 2009 6:44 pm    Post subject: Reply with quote

Getting included as a dependency is the leading cause of unexected objects being included in the synchronization script, and dependencies are included by default.

To avoid including dependencies, check what options you're using - you'll need specify the exact set of options you want, rather than just using Options.Default which contains the option Options.IncludeDependencies.
Back to top
View user's profile Send private message
sdwire



Joined: 17 Mar 2009
Posts: 2

PostPosted: Tue Mar 17, 2009 7:26 pm    Post subject: Reply with quote

BINGO!

That was exactly it. Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group