rowversion, or how to exclude a column from a mapping

Automate and integrate using the SQL comparison API

Moderators: Chris Auckland, David Atkinson, Michelle Taylor, chengvoon.tong

rowversion, or how to exclude a column from a mapping

Postby RangerDick » Wed Jun 27, 2012 1:46 am

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
RangerDick
 
Posts: 2
Joined: Wed Jun 27, 2012 1:37 am
Location: SoCal

Postby james.billings » Thu Jun 28, 2012 2:07 pm

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!
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby RangerDick » Mon Jul 02, 2012 7:19 pm

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"]);
RangerDick
 
Posts: 2
Joined: Wed Jun 27, 2012 1:37 am
Location: SoCal

Postby james.billings » Mon Jul 02, 2012 7:33 pm

Yeah, that'll work - you can either code them specifically or iterate through a collection of names obtained from "somewhere"
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SQL Comparison SDK 10

Who is online

Users browsing this forum: No registered users and 0 guests