How to exclude column by code?

Automate and integrate using the SQL comparison API

Moderator: Chris Auckland

How to exclude column by code?

Postby ampo » Thu May 21, 2009 7:32 am

Hello.

How can I exclude column from beeing compared by code?

This is my current code:
Code: Select all
commonTables = Tables.CreateFromIntersection(dbSource.Tables, dbTarget.Tables);

TableComparisonSetting = new TableComparisonSetting(table.FullyQualifiedName, table.Fields, table.PrimaryKey.Fields);

m_settings.Add(TableComparisonSetting);

m_session.CompareDatabases(dbSource, dbTarget, m_settings);

block = m_provider.GetMigrationSQL(m_session, true);


Is it somthing in the "table.Fields" parameter?

Thanks.
ampo
 
Posts: 8
Joined: Thu May 21, 2009 7:19 am

Postby Brian Donahue » Thu May 21, 2009 11:32 am

The following example shows how to exclude particular fields from the data comparison: http://labs.red-gate.com/index.php/Comp ... ionExample

I hope this works for you.
Brian Donahue
 
Posts: 6669
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Comparison SDK Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests