TrimTrailingSpaces
shaynes41
Posts: 4
I can't seem to get the ComparisonOptions.TrimTrailingSpaces to work in the API.
When I use the UI and Check the "Trim Trailing Spaces" box on the options tab, my data compare comes up with all the data matching.
When I add the ComparisonOptions.TrimTrailingSpaces to my mapping options, the data compare comes up with the data mismatching. It seems like this option is not working. Below is the code I'm trying to run:
When I use the UI and Check the "Trim Trailing Spaces" box on the options tab, my data compare comes up with all the data matching.
When I add the ComparisonOptions.TrimTrailingSpaces to my mapping options, the data compare comes up with the data mismatching. It seems like this option is not working. Below is the code I'm trying to run:
mappings.Add(tableMapping); mappings.Options = new EngineDataCompareOptions(MappingOptions.Default, ComparisonOptions.TrimTrailingSpaces, SqlOptions.Default); Console.WriteLine("** Comparing Databases"); session.CompareDatabases(db1, db2, mappings); Console.WriteLine("** Comparison Finished");Any ideas?
This discussion has been closed.
Comments
mappings.Options = new EngineDataCompareOptions(
MappingOptions.Default,
ComparisonOptions.TrimTrailingSpaces | ComparisonOptions.Default,
SqlOptions.Default);
- James
--
James Moore
Red Gate Software Ltd
Head of DBA Tools
Red Gate Software Ltd
Has anyone else been able to get this to work?
You may want to also configure the comparision session too. Here is a code snippit. (This code snippit also configures the SQL provider aswell.)
Hope this helps.
David
Thanks!