Options

Creating Different option sets in C#

fordc03fordc03 Posts: 49 Bronze 2
edited September 11, 2006 1:59PM in SQL Toolkit Previous Versions
When I register a database...

and I get to the options part of the register statement...and I don't want to pull the WHOLE Schema...how do I put together a set of options?

Do I use an enum?

the C# example looks like this:
db1.Register(new ConnectionProperties(ServerName, DBName), Options.Default);

If I want to change Options.Default to anything else and string a list of Options out to ignore certain things...it doesn't like that.

Can anyone provide a quick example on what to do?

Comments

  • Options
    Hello,

    In the c# language, you combine enumeration elements together with the bitwose OR operator, which is a single vertical bar, for instance:
    Options o = Options.Default | Options.ForceColumnOrder | Options.IgnorePermissions;
    

    The effect of this is that you start with the default options and add more options to this. You could also explicitly state a set of options by omitting Options.Default from the enumeration elements that you specify.

    Hope this helps!
  • Options
    fordc03fordc03 Posts: 49 Bronze 2
    thanks Brian, you rock!!! :)
Sign In or Register to comment.