| Author |
Message |
sdwire
Joined: 17 Mar 2009 Posts: 2
|
Posted: Tue Mar 17, 2009 4:47 pm Post subject: Alter View difference has Selected=false, but still executes |
|
|
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 |
|
 |
Michelle Taylor
Joined: 30 Oct 2006 Posts: 522 Location: Red Gate Software
|
Posted: Tue Mar 17, 2009 6:44 pm Post subject: |
|
|
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 |
|
 |
sdwire
Joined: 17 Mar 2009 Posts: 2
|
Posted: Tue Mar 17, 2009 7:26 pm Post subject: |
|
|
BINGO!
That was exactly it. Thanks! |
|
| Back to top |
|
 |
|
|
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