toolkit questions

Brian DonahueBrian Donahue Posts: 6,590 New member
edited September 8, 2004 12:47PM in SQL Toolkit Previous Versions
Hi Darren,

It is possible to modify a Packager project template by opening c:\program files\red gate sql bundle\sql packager\SQL Packager Code Templates\c#\Package.csproj.

From there, it would be possible to change the behavior, for instance, to choose to lock the package user into having to create a database by changing FormSelectDatabase.cs. You can also run batches of SQL before or after running the SQL batches by editing the PackageExecutor class' Execute method and adding an ExecuteSQL command before or after the packager iterates through the running of the SQL batches.

You could use SQL Toolkit to automate the package build, for instance, to display a result store and let the user choose which records to synchronize (You'd use a selectiondelegate to do that work). Automating SQL Packager is identical to automating SQL Compare and Data Compare, you need to compare and synchronize the data and schema before packaging it. Once you've chosen the objects and data using your own application, you can use the Packager object and it should just package the things that you had selected to migrate.

The resultstore itself lives in the temp directory and will get deleted when the ComparisonSession is disposed, so there's little control over that.
This discussion has been closed.