Compare Options.Default seems to always be on
findtim
Posts: 10
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? :
Any help is much appreciated.[/code]
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? :
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]
Comments
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?
What kind of differences does it report?
That is the big issue
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?
This logic worked.
Thanks again.