The SaveToSQLServer method saves information being held in the Package2 object and its subordinate objects and collections to the specified server running an instance of Microsoft® SQL Server™.
object.SaveToSQLServer(
ServerName,
[ServerUserName],
[ServerPassword],
[Flags],
[PackageOwnerPassword],
[PackageOperatorPassword],
[PackageCategoryID],
[pVarPersistStgOfHost],
[bReusePasswords])
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list. |
ServerName | A string specifying the name of the server to which to connect. |
ServerUserName | A string specifying the logon name used to access the server specified by ServerName. |
ServerPassword | A string specifying the password used to access the server specified by ServerName. |
Flags | A value from the DTSSQLServerStorageFlags constants that specifies the type of user authentication used to access the server specified by ServerName. |
PackageOwnerPassword | A string specifying the package owner password if the package is encrypted. |
PackageOperatorPassword | A string specifying the package user password if the package is encrypted. |
PackageCategoryID | A string specifying the package category (reserved). |
pVarPersistStgOfHost | Screen layout information associated with a package (for internal use). |
bReusePasswords | A Boolean specifying whether to reuse package passwords. |
A new version ID value is always generated when the package is saved.
The default for bReusePasswords is True.
HRESULT SaveToSQLServer(
BSTR ServerName,
BSTR ServerUserName,
BSTR ServerPassword,
DTSSQLServerStorageFlags Flags,
BSTR PackageOwnerPassword,
BSTR PackageOperatorPassword,
BSTR PackageCategoryID,
VARIANT pVarPersistStgOfHost),
VARIANT_BOOL bReusePasswords);