Excluding Tables doesn't seem to work
faniedt
Posts: 5 New member
I'm trying to exclude a list of tables from the compare but it doesn't seem to work. Below is my code that loops through the mappings and the datatable that contains the tablenames to exclude.
Thanks in advance ...
RedGate rg = new RedGate(); DataTable dtTableToExclude = rg.GetTablesToExclude(); for (int i = 0; i < dtTableToExclude.Rows.Count; i++) { tableToExclude = "[dbo].[" + dtTableToExclude.Rows[i]["TableName"].ToString() + "]"; foreach (TableMapping m in mappings) { try { if (m.Obj1.FullyQualifiedName != null) { if (m.Obj1.FullyQualifiedName == tableToExclude) { m.Include = false; break; } } m.RefreshMappingStatus(); }
Thanks in advance ...
Comments
Could you give me some info about what exactly it is that you're trying to do? Would you be able to get your code to ignore any differences relating to the tables that you're not interested in?
Redgate Software