How to modify a sdc project template
yves
Posts: 2
Hi,
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:
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??
Thanks,
Yves.
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:
<TableActions type="ArrayList" version="1"> <value version="1" type="SelectTableEvent"> <action>SetLeftWhereClause</action> <TableName>[dbo].[CompanyCourse]:[dbo].[CompanyCourse] </TableName> <IndexName>CompanyGuid='{21D6F547-B3E8-496A-A916- 829CF5B72F0F}'</IndexName> </value> ....
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??
Thanks,
Yves.
Comments
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.
Project Manager
Red Gate Software Ltd