SaveToSQLServerAs Method

DTS Programming

DTS Programming

SaveToSQLServerAs Method

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™. The new name and a new package ID are assigned.

Applies To
Package2 Object
Syntax

object.SaveToSQLServerAs(
    NewName,
    ServerName,
    [ServerUserName],
    [ServerPassword],
    [Flags],
    [PackageOwnerPassword],
    [PackageOperatorPassword],
    [PackageCategoryID],
    [pVarPersistStgOfHost],
    
[bReusePasswords])

Part Description
object Expression that evaluates to a Package2 object.
NewName A string specifying the new name for the package.
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.

Remarks

New package ID and version ID values are generated when the package is saved, and the new name is assigned.

The default for bReusePasswords is True.

Prototype (C/C++)

HRESULT SaveToSQLServerAs(
    BSTR NewName,
    BSTR ServerName,
    BSTR ServerUserName,
    BSTR ServerPassword,
    DTSSQLServerStorageFlags Flags,
    BSTR PackageOwnerPassword,
    BSTR PackageOperatorPassword,
    BSTR PackageCategoryID,
    VARIANT pVarPersistStgOfHost),
    VARIANT_BOOL bReusePasswords);

See Also

DTSSQLServerStorageFlags

Managing DTS Package Programs

SaveAs Method

SaveToRepositoryAs Method

SaveToSQLServer Method

SaveToStorageFileAs Method