Options

Setting SqlOptions

adamtysonadamtyson Posts: 2
Hi,

I'm using SqlDataCompare to compare 2 databases, and need to set the DisableTriggers option to true.
I guess I can set the option through SqlProvider.options, but can't get this working, could someone provide a c# code sample?

many thanks,

Adam

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Adam,

    Certainly! You can specify options to the SqlProvider like this:
    SqlProvider p=new SqlProvider();
    p.Options=SqlOptions.Default | SqlOptions.ExcludeIdentities | SqlOptions.TrimTrailingSpaces;
    
    or this:
    SqlProvider p=new SqlProvider();
    SqlOptions enOptions=SqlOptions.Default | SqlOptions.ExcludeIdentities | SqlOptions.TrimTrailingSpaces;
    p.Options=enOptions;
    
This discussion has been closed.