DTS Programming

SaveToSQLServer 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™.

Applies To
Package Object Package2 Object

Syntax

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.

Remarks

A new version ID value is always generated when the package is saved.

The default for bReusePasswords is True.

Prototype (C/C++)

HRESULT SaveToSQLServer(
    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

SaveToRepository Method

SaveToSQLServerAs Method

SaveToStorageFile Method