Red Gate forums :: View topic - rowversion, or how to exclude a column from a mapping
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Comparison SDK 10
SQL Comparison SDK 10 forum

rowversion, or how to exclude a column from a mapping

Search in SQL Comparison SDK 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
RangerDick



Joined: 27 Jun 2012
Posts: 2
Location: SoCal

PostPosted: Wed Jun 27, 2012 1:46 am    Post subject: rowversion, or how to exclude a column from a mapping Reply with quote

Hi!

I need guidance on how to exclude a field from the data comparison.

This particular field is being used as a high water mark in the tables and it is a rowversion type (timestamp). Does the SDK automaticall exclude them on comparison, or do I have to explicitly exclude them? Does it matter if I am using them in the where clause for comparison?

A brief example would be most welcomed. I have found a sample using the tablemapping.fieldmapping.add but not for the remove.

Thanks,
RD
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1113
Location: My desk.

PostPosted: Thu Jun 28, 2012 2:07 pm    Post subject: Reply with quote

Thanks for your post- it looks like one of the examples on our SDK page may help: see here - although I just spotted you mailed us to say you're okay now, so if you already worked it out that's great!
Back to top
View user's profile Send private message
RangerDick



Joined: 27 Jun 2012
Posts: 2
Location: SoCal

PostPosted: Mon Jul 02, 2012 7:19 pm    Post subject: Reply with quote

Thanks for the support. I did not find a direct sample (perhaps I missed it). This was my solution in C#:

mapping.FieldMappings.Remove(mapping.FieldMappings["FieldName"]);
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1113
Location: My desk.

PostPosted: Mon Jul 02, 2012 7:33 pm    Post subject: Reply with quote

Yeah, that'll work - you can either code them specifically or iterate through a collection of names obtained from "somewhere"
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