Saving a Package Programmatically

新建日期: 2006 年 4 月 14 日

After building a new package programmatically, or modifying an existing one, you usually want to save your changes.

All of the methods used in this topic to save packages require a reference to the Microsoft.SqlServer.ManagedDTS assembly. After you add the reference in a new project, import the Microsoft.SqlServer.Dts.Runtime namespace with a using or Imports statement.

Saving a Package Programmatically

To save a package programmatically, call one of the following methods of the Integration Services Application class:

Storage Location Method to Call

File

SaveToXml

SSIS Package Store

SaveToDtsServer

SQL Server

SaveToSqlServer

or

SaveToSqlServerAs

ms403347.note(zh-cn,SQL.90).gif重要提示:
The methods of the Application class for working with the SSIS Package Store only support "." or the server name for the local server. You cannot use "(local)" or "localhost".

请参阅

其他资源

保存包

帮助和信息

获取 SQL Server 2005 帮助