Red Gate forums :: View topic - Ignore Table Index Differences
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Comparison SDK Previous Versions
SQL Comparison SDK Previous Versions forum

Ignore Table Index Differences

Search in SQL Comparison SDK Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
bondjw07



Joined: 20 May 2014
Posts: 2
Location: United States

PostPosted: Tue May 20, 2014 7:01 pm    Post subject: Ignore Table Index Differences Reply with quote

Hello,
I am attempting to use the SDK to compare 2 tables. These table are identical with the exception of their indexes. In the SQL Compare windows app, I can ignore indexes from within the Project Configuration->Options screen. I am wonder how I can do this from within the SDK comparison. Thanks
~Justin
Back to top
View user's profile Send private message AIM Address
bondjw07



Joined: 20 May 2014
Posts: 2
Location: United States

PostPosted: Wed May 21, 2014 4:47 pm    Post subject: Multiple Ignores? Reply with quote

Ok, so I figured out how to ignore indexes, but I would also like to ignore other items. Here is the code I am using:
Code:
Dim objDatabase1 As New Database
Dim objDatabase2 As New Database
Dim objDifferences As Differences
objDifferences = objDatabase1.CompareWith(objDatabase2, Options.IgnoreIndexes)

So I the above code, Options.IgnoreIndexes is allowing me to ignore indexes. However, I lose the ability to also use the default options. I would like to have the default options plus the ability to ignore indexes. I tried objDatabase1.CompareWith(objDatabase2, Options.IgnoreIndexes or Options.None), but that doesn't seem to give me the expected results.
Suggestions?
Back to top
View user's profile Send private message AIM Address
stanori



Joined: 23 Apr 2012
Posts: 84

PostPosted: Thu May 22, 2014 3:02 pm    Post subject: Reply with quote

Hi bondjw07,

Thanks for your post. In regards to your question about keeping the defaults, and adding the ignore indexes, starting with version 10.5 of the SDK, there is a new class called "Options.Default.Plus" that can be used to use the default options, plus which ever additional options you would like to add to the project.

In previous versions of the SQL Comparison SDK, comparison options were specified as a bit flags enum. For example:

Options.Default | Options.DropAndCreateInsteadOfAlter

In version 10.5, options are specified using the methods in the Options class. For example:

Options.Default.Plus(Options.DropAndCreateInsteadOfAlter)

For more details see:
https://documentation.red-gate.com/display/CSD10/Breaking+changes+in+SQL+Comparison+SDK+10.5

Hope this helps.

Best Regards,
Steve
_________________
_________________
Steve Tanori
Product Support
Red Gate Software Ltd.
866-997-0378
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group