Exclude tables from comparison
mpbarnes27615
Posts: 3
I am using the SQL Compare in conjunction with Data Compare to sync the DB on several tablet pc's with a master server DB. My problem is that I only want to sync certain tables from master server DB with the tablet DB. I know when you use the program you can check and uncheck each table for synchonization, but I am creating an app using the Toolkit and wish to do this programatically, in VB.net. Thanks in advance,
Matt Barnes
Barnestorm, Inc.
Matt Barnes
Barnestorm, Inc.
This discussion has been closed.
Comments
Yes, you can choose the tables to synchronize using the Toolkit. If you look at the sample code for SQL Compare, there is a bit that loops through all of the differences and sets their Selected property to True. This is how you select objects to be scripted. You could include a conditional statement (an if) somewhere in this loop to include objects by name or by type.
that did it.
Matt Barnes
Barnestorm, Inc.
It's probably the 'includedependencies' SQL Option that's scripting dependent objects. You can try taking that option out of the Options enumeration rather than using Options.Default, but that may cause the script to fail, depending.