Red Gate forums :: View topic - Using SynchronizationRecord how to find column ordinal?
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

Using SynchronizationRecord how to find column ordinal?

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



Joined: 22 Apr 2011
Posts: 10
Location: Bali, Indonesia

PostPosted: Fri Apr 22, 2011 5:56 am    Post subject: Using SynchronizationRecord how to find column ordinal? Reply with quote

I want to compare two tables and usinf SyncronisationRecord, only update the tables where the values of a specific column are different. I can use the row.FieldDifferent, but for this I need the ordinal of the column. I don't like to use a number, as they have a habit of changing. Better to use the column name, less likely to change. Is there anyway to find what is the ordinal number of a column by it's name?

Thanks
Back to top
View user's profile Send private message
peter.peart
Site Admin


Joined: 02 Sep 2008
Posts: 362
Location: Top floor, RG towers with the cool kids

PostPosted: Mon Apr 25, 2011 2:43 pm    Post subject: Reply with quote

Hi there,

The example on the below page details how to get comparison results including column names:

http://sdk.red-gate.com/index.php/StoreExample

With that in mind, once you have the column names you should then be able to sync based on them.

HTH!

Pete
_________________
Peter Peart
Red Gate Software Ltd
+44 (0)870 160 0037 ext. 8569
1 866 RED GATE ext. 8569
Back to top
View user's profile Send private message Send e-mail
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