comparison key.

Automate and integrate using the SQL comparison API

Moderator: Chris Auckland

comparison key.

Postby hemantgaur » Fri Jan 29, 2010 6:58 pm

is there a way to figure out which columns are going to be used for comparison, preferably in selectiondelegate implementation?

I am sure it must be stored somewhere before even comparison begins, i guess I am asking how do i access it runtime?

Thank you very much.
hemantgaur
 
Posts: 20
Joined: Wed Dec 16, 2009 9:15 pm

Postby Brian Donahue » Mon Feb 01, 2010 4:45 pm

Hello,

If I understand you correctly, what you want to do is create a set of default mappings, then loop through each TableMapping and check the "Include" property on it, and in each of these loop through all of its' FieldMappings and see if they have the "Include" property set to true.

If a column could not be mapped, the "Include" property will be set to "false".
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

comparison key

Postby hemantgaur » Mon Feb 01, 2010 4:53 pm

I am sorry. I should have been more clear. I meant primary key. What I meant to ask is out of all the columns that I am comparing what amongst those are the part of the primary key.

Thank you.
hemantgaur
 
Posts: 20
Joined: Wed Dec 16, 2009 9:15 pm

Postby Brian Donahue » Wed Feb 03, 2010 5:36 pm

Hello,

Each TableMapping has a MatchingMappings property -- this is a collection of Fields that make up the comparison key, whether the mapping was created automatically or you created it yourself.
Brian Donahue
 
Posts: 6670
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