LoadFromSQLServer Method

DTS Programming

DTS Programming

LoadFromSQLServer Method

The LoadFromSQLServer method loads the Data Transformation Services (DTS) package from the specified server running an instance of Microsoft® SQL Server™. This includes information held in the objects and collections that belong to the Package2 object.

Applies To
Package Object Package2 Object
Syntax

Package.LoadFromSQLServer ServerName, [ServerUserName], [ServerPassword], _
    [Flags], [PackagePassword], [PackageGuid], [PackageVersionGuid], _
    [PackageName], [pVarPersistStgOfHost]

Part Description
Package Expression that evaluates to an object in the Applies To list.
ServerName Server name.
ServerUserName Server user name.
ServerPassword Server user password.
Flags Value from the DTSSQLServerStorageFlags constants indicating user authentication type.
PackagePassword Package password if the package is encrypted.
PackageGuid Package identifier, which is a string representation of a globally unique identifier (GUID).
PackageVersionGuid Version identifier which is a string representation of a GUID.
PackageName Package name.
pVarPersistStgOfHost Screen layout information associated with a package (for internal use only).

Remarks

If PackageVersionGUID is not specified or is blank, the most recent version of the package is retrieved.

Prototype (C/C++)

HRESULT LoadFromSQLServer(
    BSTR ServerName,
    BSTR ServerUserName,
    BSTR ServerPassword,
    DTSSQLServerStorageFlags Flags CPPDEFAULT(= DTSSQLStgFlag_Default),
    BSTR PackagePassword CPPDEFAULT(= NULL),
    BSTR PackageGuid CPPDEFAULT(= NULL),
    BSTR PackageVersionGuid CPPDEFAULT(= NULL),
    BSTR PackageName CPPDEFAULT(= NULL),
    VARIANT *pUnkPersistStgOfHost CPPDEFAULT(= NULL) );

See Also

DTSSQLServerStorageFlags

LoadFromRepository Method

LoadFromStorageFile Method

Managing DTS Package Programs

RemoveFromSQLServer Method

SaveToSQLServer Method

SaveToSQLServerAs Method