| Author |
Message |
findtim
Joined: 18 Jan 2011 Posts: 8
|
Posted: Tue Jan 18, 2011 9:07 pm Post subject: Compare Options.Default seems to always be on |
|
|
Hi,
I have need to use specific options during my compare and part of the requirement is to not have the default options. I have used the logical OR to add together the options I want, but the default always seems to be used. I have resorted to specifying none as you will see below, but still I see this behavior. And not only in the SDK, but also in the command-line version of SQL Compare. Here is a snippet of code that I used to accomplish the requirements. Where am I going wrong? :
| Code: |
Private Const myDefaults As Long = Options.None
TargetDB.Register(targetConnProps, myDefaults)
SourceScripts.Register(SourceCodeLocation, New ReadFromFolder.ScriptDatabaseInformation(), myDefaults)
Dim folderVsDB As Differences
folderVsDB = TargetDB.CompareWith(SourceScripts, myDefaults)
Dim difference As Difference
For Each difference In folderVsDB
difference.Selected = True
Next
Dim work As New Work()
work.BuildFromDifferences(folderVsDB, myDefaults, False) |
RedGate.SQLCompare.Engin.dll version is 8.2.1.7
Any help is much appreciated.[/code] |
|
| Back to top |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 710 Location: Red Gate Software Ltd.
|
Posted: Thu Jan 20, 2011 6:55 pm Post subject: |
|
|
Thanks for your post.
I'm not really sure what the problem could be, I've tested it and it and you can configure the options on the command line and using the API.
When you step through the code, what is myDefaults set to?
If it's set to 0, what are the symptoms that make you think it's using the default options? _________________ Chris |
|
| Back to top |
|
 |
findtim
Joined: 18 Jan 2011 Posts: 8
|
Posted: Wed Jan 26, 2011 11:12 pm Post subject: Symptoms that make me think it is not working |
|
|
| If I use the same options in the SDK or cmdline vs SQL Compare client. SQL Compare shows no changes, SDK shows changes. |
|
| Back to top |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 710 Location: Red Gate Software Ltd.
|
Posted: Fri Jan 28, 2011 3:16 pm Post subject: |
|
|
Are you using the very same SQL Compare engine?
What kind of differences does it report? _________________ Chris |
|
| Back to top |
|
 |
findtim
Joined: 18 Jan 2011 Posts: 8
|
Posted: Fri Jan 28, 2011 5:04 pm Post subject: The differences |
|
|
When it comes down to it - what I care most about is that it seems to want to include dependencies even those I am not using the default options and I am not choosing Options.IncludeDependencies.
That is the big issue |
|
| Back to top |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 710 Location: Red Gate Software Ltd.
|
Posted: Thu Feb 03, 2011 3:54 pm Post subject: |
|
|
Sorry for the delay; I missed your last post.
I'm not sure why the option would be used if it isn't set, I haven't seen that happen before. If you would like me to take a look at your project, feel free to reply to the support ticket we have open for you. (I'll send this message via the ticket as well).
Does the problem also occur if you use one of the sample applications, and remove the 'IncludeDependencies' option? _________________ Chris |
|
| Back to top |
|
 |
findtim
Joined: 18 Jan 2011 Posts: 8
|
Posted: Mon Feb 07, 2011 4:22 pm Post subject: Thank you |
|
|
Chris thank you for your reply about how to address what I was seeing. From my untrained eye it appeared that SQL Compare SDK was pushing dependencies, when really it was refreshing views because of the differences loop logic that I was using.
This logic worked.
| Code: |
Dim difference As Difference
For Each difference In folderVsDB
If difference.Type = DifferenceType.Equal Then
difference.Selected = False
Else
difference.Selected = True
End If
Next |
Thanks again. |
|
| Back to top |
|
 |
|