What are the challenges you face when working across database platforms? Take the survey

STK 3 - Programatically setting Packager Engine to upgrade

Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
edited November 5, 2004 5:16AM in Knowledge Base
  • Date: 5 Nov 2004
  • Versions affected: Toolkit 3.37

SQL Packager, as well as the Packager Engine assembly that you can reference to programatically create a package using a .net IDE, can either create a new database or upgrade an existing one.

In the SQL Toolkit documentation there is no reference on how to change the package's behaviour so that a database upgrade is created rather than a package to create a new database.

In order to change the behaviour, you'll need to set a property in the package using the AddProperty method of the engine called PACKAGE_UPGRADE_DATABASE by adding the following code to your project:

PackagerEngine engine...

engine.AddProperty("PACKAGE_UPGRADE_DATABASE", "true");
Sign In or Register to comment.