.netsqlcompare

SQLCompare SDK using more than the default options


I want to use SQLCompare as part of a project to generate a script for upgrading databases. I have a set of options that should be included when I go to register the database, but I don't know how to combine the options. I'd like to send more than just the default options.

Basic Goal:

Dim db as New RedGate.SQLCompare.Engine.Database
Dim options as RedGate.SQLCompare.Engine.Options
db.Register(New ConnectionProperties(server, dbname, user, password), options)

I've tried using a plus sign options = options + Optins.IgnoreWhiteSpace
and logical or options = options OR Optins.IgnoreWhiteSpace,
but I get an error saying the operator isn't valid for type RedGate.SQLCompare.Engine.Options.

Based on what I've found online (such as here: http://sdk.red-gate.com/index.php/Selecting_Objects_to_Synchronize#VB), what I am doing should work.

I have included references to RedGate.Shared.SQL, RedGate.Shared.Utils, both versions 9.5.0.724, and RedGate.SQLCompare.Engine, version 10.4.1.223.

So am I typing code wrong, or do I have something setup wrong?


Solution

  • The answer is to use the Plus() method, as in options.Plus(Options.IgnoreWhiteSpace)

    I used Intellisense to see if I could chain options together, so I just hit . and started reading.

    Apparently walking away for lunch was all I needed to do to figure it out.