LoadFromRepository Method

DTS Programming

DTS Programming

LoadFromRepository Method

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

Applies To
Package Object Package2 Object
Syntax

Package.LoadFromRepository RepositoryServerName, RepositoryDatabaseName, _
    RepositoryUserName, RepositoryUserPassword, PackageID, [VersionID], _
    [PackageName], [Flags], [pVarPersistStgOfHost]

Part Description
Package Expression that evaluates to an object in the Applies To list.
RepositoryServerName Meta Data Services server name.
RepositoryDatabaseName Meta Data Services database name or data source name (DSN).
RepositoryUserName Meta Data Services user name.
RepositoryUserPassword Meta Data Services user password.
PackageID Package identifier, which is a string representation of a globally unique identifier (GUID).
VersionID Version identifier, which is a string representation of a GUID.
PackageName Name of package to be loaded.
Flags Value from the DTSRepositoryStorageFlags constants indicating user authentication type.
pVarPersistStgOfHost Screen layout information associated with a package (for internal use only).

Remarks

RepositoryDatabaseName is evaluated as an ODBC DSN if RepositoryServerName is empty or NULL. Otherwise, RepositoryServerName and RepositoryDatabaseName are used to create a connection without a DSN.

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

Prototype (C/C++)

HRESULT LoadFromRepository(
    BSTR RepositoryServerName,
    BSTR RepositoryDatabaseName
    BSTR RepositoryUserName,
    BSTR RepositoryUserPassword,
    BSTR PackageID,
    BSTR VersionID CPPDEFAULT(= NULL)
    BSTR PackageName CPPDEFAULT(= NULL)
    DTSRepositoryStorageFlags Flags CPPDEFAULT(= DTSReposFlag_Default),
    VARIANT *pUnkPersistStgOfHost CPPDEFAULT(= NULL));

See Also

DTSRepositoryStorageFlags

LoadFromSQLServer Method

LoadFromStorageFile Method

Managing DTS Package Programs

RemoveFromRepository Method

SaveToRepository Method

SaveToRepositoryAs Method