Exclude tables and columns in SQL Data Compare 7.1 in API

acjagacjagacjagacjag Posts: 9
I am using the SQL Data Compare version 7.1.
I am loading a .sdc file and doing the comparison and executing the sync sql block.

I also setting the exclude option in the .sdc file to exclude some of the tables and few columns in tables. If I run through SQL Compare GUI the compare works perfectly, but through API it does for all the columns in all tables.

I knew we have to set the use this below logic code block, which is suggested in this post http://www.red-gate.com/messageboard/vi ... php?t=5684
foreach (TableMapping tm in mappings)
if (tm.Obj1 != null)
if (!ideLi("[dbo].[" + tm.Obj1.Name + "]")) // ideLi method chechs if table should be included
tm.Include = false;
if (tm.Obj2 != null)
if (!ideLi("[dbo].[" + tm.Obj2.Name + "]"))
tm.Include = false;

But how to read the TableActions xml setting from the sdc file inorder to write ideLi()method in the above code.
Do you offer any class for that?

Jagadeeswaran AC


  • Options
    http://www.red-gate.com/MessageBoard/vi ... php?t=5684

    If you're basing the table selection on an existing project file, I believe the "ReplayUserActions" method of the "project" object is what you should use. You pass in a SchemaMappings collections ByRef and this method should apply the user-defined mappings specified in the project file. This had appeared in v7 or maybe v7.1, so hopefully you have that version of SDK.

    I hope this works for you.
Sign In or Register to comment.