DTS Programming

SaveToRepositoryAs Method

The SaveToRepositoryAs method saves information being held in the Package object and its subordinate objects and collections to the specified instance of Microsoft® SQL Server™ 2000 Meta Data Services. The new name and a new Data Transformation Services (DTS) package ID are assigned.

Applies To
Package2 Object

Syntax

object.SaveToRepository(
    
NewName,
    RepositoryServerName,
    RepositoryDatabaseName,
    RepositoryUserName,
    RepositoryUserPassword,
    [Flags],
    [CategoryID],
    [pVarPersistStgOfHost])

Part Description
Object Expression that evaluates to a Package2 object.
NewName A string specifying the new name for the package.
RepositoryServerName A string specifying the name of the server on which the instance of Meta Data Services is hosted.
RepositoryDatabaseName A string specifying the name of the database in which the instance of Meta Data Services is located.
RepositoryUsername A string specifying the logon name used to access the server specified by ServerName.
RepositoryUserPassword A string specifying the password used to access the server specified by ServerNam.e
Flags A value from the DTSRepositoryStorageFlags constants that specifies the type of user authentication used to access the server specified by RepositoryServerName.
CategoryID Reserved.
pVarPersistStgOfHost Screen layout information associated with a package (for internal use).

Remarks

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

New package ID and version ID values are generated when the package is saved.

Prototype (C/C++)

HRESULT SaveToRepositoryAs(
    BSTR NewName,
    BSTR RepositoryServerName,
    BSTR RepositoryDatabaseName,
    BSTR RepositoryUserName,
    BSTR RepositoryUserPassword,
    DTSRepositoryStorageFlags Flags,
    BSTR CategoryID,
    VARIANT pVarPersistStgOfHost);

See Also

DTSRepositoryStorageFlags

Managing DTS Package Programs

SaveAs Method

SaveToRepository Method

SaveToSQLServerAs Method

SaveToStorageFileAs Method