Options

Please explain about Options

johnhutchjohnhutch Posts: 10
edited January 4, 2006 1:01PM in SQL Toolkit Previous Versions
You pass an Options value when Registering (connecting?) a database and then you pass an Options value when creating a differences list.

In most of the demo code I have seen you pass an Options.default value.
In SQL Compare I can set a user defined options. Where is this user defined options value used in the comparison/syncronize process?

I have 2 test databases with a small set of differences. I run the SQL Compare and see a correct set. If I run the Toolkit to produce a set of differences on the same 2 databases I see a different set of differences (larger) form SQL Compare. I believe the problem is related to the Options value I am passing.

Comments

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

    The specified options determine how schema objects will be compared, and again to determine how they will be synchronized. For example:
    db1.CompareWith(db2, Options.Default)
    
    will accept a bitwise ORed selection of Options in place of Options.Default. This can change the number of reported differences, for example if you ignore constraint and index names, you may see less differences appear. Always remember to use the same options when generating the migration script or you will be puzzled with the results after synchronization.
    Work work=new Work();
    
    work.BuildFromDifferences(differences, Options.Default, true);
    
Sign In or Register to comment.