Problem with IncludeTimestamp
hmadyson
Posts: 2
Hi,
I am using the api with the datacompare to compare 2 databases. I am using the following code for the mapping options
I have timestamps on every table, so I want to ignore those timestamps.
Unfortunately I cannot find the right mix. These options get me to have no Sames in any of the tables.
When the compare creates a script, it excludes all of the changes that are due to timestamp, but I can't get the number counts right.
What am I doing wrong?
Thanks.
I am using the api with the datacompare to compare 2 databases. I am using the following code for the mapping options
private EngineDataCompareOptions _options = new EngineDataCompareOptions( MappingOptions.IgnoreSpaces | MappingOptions.IncludeIdentities | MappingOptions.IgnoreCase, ComparisonOptions.Default, SqlOptions.Default );
I have timestamps on every table, so I want to ignore those timestamps.
Unfortunately I cannot find the right mix. These options get me to have no Sames in any of the tables.
When the compare creates a script, it excludes all of the changes that are due to timestamp, but I can't get the number counts right.
What am I doing wrong?
Thanks.
Comments
There is an option to ignore timestamps in an "atomic" way, so that you do not have trawl through all of the column mappings looking for timestamp columns.
All that you should need to do is unset MappingOptions.IncludeTimestamps in the first argument to EngineDataCompareOptions (if it is set you can use an XOR operator, for instance in C# MappingOptions.Default ^ MappingOptions.IncludeTimestamps)
In the data compare engine, timestamps can only be compared and the synchronization will ignore them anyway. For this reason, the setting should only affect any display of the data diferences, but not the actual script.
Thanks!