TableComparisonSettings

jvencljvencl Posts: 4
edited December 12, 2006 5:58PM in SQL Toolkit Previous Versions
I am updating a old program to the new SQL Bundle 5 toolkit, and I'm finding it hard to convert some of the old objects into new 05 ojects. Could someone please help me with this.

The last two issues I'm dealing with are as follows ....

1. I have an object dimmed as type TableComparisonSettings, but this type does not seem to exist in the new bundle. Is there a new type I should be using instead?

2. There was a function under the RedGate.SQLDataCompare.Engine.Tables namespace called CreateFromIntersection. This function had a return type of type Tables. This does not seem to exist anymore either. Should I be looking under a different namesapce, or am i just blind and not seeing this correctly.

Any help would be greatly appreciated, Thanks. :D
John M. Vencl
Software Developer

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi John,

    The SQL Compare library hasn't changed much from 3-5, but the Data Compare library got the heavy-handed treatment because it needs to accomodate the new 'mapping' features. Unfortunately this is going to mean a late night of coding for you.

    The basic idea is that Data Compare re-uses the Database objects from SQL Compare, so you create two of those, but use the RegisterForDataCompare method instead of simply the Register method.

    Next, instantiate a new TableMappings class and use TableMappings.CreateMappings, which will populate the TableMappings with the default mapings for tables that have primary keys. Now there are new ways of adding mappings for tables that do not have a primary key, unlike in DC version 3 and 4.

    For an example, have a look at c:\program files\red gate\sql bundle 5\toolkit sample files\Automating SQL Data Compare\. There is a simple example in SqlProviderExample.cs (vb)
Sign In or Register to comment.