How to modify a sdc project template

Forum for users of SQL Toolkit 3,4,and 5

How to modify a sdc project template

Postby yves » Thu Mar 06, 2008 2:32 pm


I make a sdc project file with SQL data Compare.
I'm busy to create a little .net c# forms to create different sdc file.

I load a template file with Project and change some values.
It's very easy to change the options for a database (server, username, etc) but I found nothing about the tableactions tag of a project.

For exemple:
I have this in my project:

Code: Select all
<TableActions type="ArrayList" version="1">
   <value version="1" type="SelectTableEvent">
      <TableName>[dbo].[CompanyCourse]:[dbo].[CompanyCourse]    </TableName>
      <IndexName>CompanyGuid='{21D6F547-B3E8-496A-A916-   829CF5B72F0F}'</IndexName>

I would like to navigate in this tree to replace the value of my companyGuid.

Any Idee to access this tree with the toolkit api??


Posts: 1
Joined: Thu Mar 06, 2008 2:23 pm
Location: Amsterdam

Postby richardjm » Thu Mar 06, 2008 4:17 pm

There is nothing in the supported API that allows you to do this.

The easiest way to change an sdc file from code is to load it into an XML object modify it and save it back out then use that sdc.

If you're using the toolkit you can load the SDC and then set the Where clause property on the appropriate TableMapping as appropriate.

In the example code or on the forum there are examples of how to do this.
Richard Mitchell
Project Manager
Red Gate Software Ltd
Posts: 541
Joined: Fri May 20, 2005 8:44 am
Location: Red Gate Software Ltd

Return to SQL Toolkit Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests