Red Gate forums :: View topic - How to modify a sdc project template
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Toolkit Previous Versions
SQL Toolkit Previous Versions forum

How to modify a sdc project template

Search in SQL Toolkit Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
yves



Joined: 06 Mar 2008
Posts: 1
Location: Amsterdam

PostPosted: Thu Mar 06, 2008 3:32 pm    Post subject: How to modify a sdc project template Reply with quote

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:

Code:
<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.
Back to top
View user's profile Send private message
richardjm



Joined: 20 May 2005
Posts: 389
Location: Red Gate Software Ltd

PostPosted: Thu Mar 06, 2008 5:17 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group