Article ID: 257868 - View products that this article applies to.
This article was previously published under Q257868
This article has been archived. It is offered "as is" and will no longer be updated.
In order to load a specific DTS package that is stored in the repository you must use the LoadFromRepository function. One of the function's required parameters is the PackageID. This ID identifies the DTS Package uniquely in the repository. The code sample below demonstrates how to retrieve this PackageID and use it in the function.
The following code loops through all DTS packages stored in the repository until the specified package name is found. Once the package that you want to load is found you can then get the correct PackageID and use it in the LoadFromRepository function. This code then loads the package and executes it.
To run the following code, paste it into a new form's general declarations section of a Standard EXE project and make sure to register the Microsoft DTSPackage Object Library and Microsoft Repository object references for the project:
For additional information on how to retrieve packages in all types of stores, click the article number below to view the article in the Microsoft Knowledge Base:
241249For additional information on DTS and the Microsoft Repository, click the article number below to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/241249/EN-US/ )INF: How to Obtain a List of DTS Packages
(http://support.microsoft.com/kb/246333/EN-US/ )INF: SQL Server DTS and the Microsoft Repository
Contact us for more help
Connect with Answer Desk for expert help.