Red Gate forums :: View topic - comparison key.
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

comparison key.

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



Joined: 16 Dec 2009
Posts: 20

PostPosted: Fri Jan 29, 2010 6:58 pm    Post subject: comparison key. Reply with quote

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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6581

PostPosted: Mon Feb 01, 2010 4:45 pm    Post subject: Reply with quote

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".
Back to top
View user's profile Send private message
hemantgaur



Joined: 16 Dec 2009
Posts: 20

PostPosted: Mon Feb 01, 2010 4:53 pm    Post subject: comparison key Reply with quote

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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6581

PostPosted: Wed Feb 03, 2010 5:36 pm    Post subject: Reply with quote

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.
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