Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have created a Microsoft DTS pack

Status
Not open for further replies.

JBell

Programmer
Aug 9, 2001
7
0
0
US
I have created a Microsoft DTS package in SQL 2000. Then saved it as a VB bas file as described in the on-line help for SQL server. When I open the VB bas file and try to execute it I am missing a reference but can not find what reference I should be adding to the project. The following is the declaration section of the code. The reference to 'NEW DTS.PACKAGE' is what is failing.

'****************************************************************

'Microsoft SQL Server 2000
'Visual Basic file generated for DTS Package
'File Name: DTS Package.bas
'Package Name: New Package
'Package Description:
'Generated Date: 8/22/2001
'Generated Time: 8:59:51 AM

'****************************************************************

Option Explicit
Public goPackageOld As New DTS.Package
Public goPackage As DTS.Package2
Private Sub Main()
Set goPackage = goPackageOld

goPackage.Name = "New Package"
goPackage.WriteCompletionStatusToNTEventLog = False
goPackage.FailOnError = False
goPackage.PackagePriorityClass = 2
goPackage.MaxConcurrentSteps = 4
goPackage.LineageOptions = 0
goPackage.UseTransaction = True
goPackage.TransactionIsolationLevel = 4096
goPackage.AutoCommitTransaction = True
goPackage.RepositoryMetadataOptions = 0
goPackage.UseOLEDBServiceComponents = True
goPackage.LogToSQLServer = False
goPackage.LogServerFlags = 0
goPackage.FailPackageOnLogFailure = False
goPackage.ExplicitGlobalVariables = False
goPackage.PackageType = 0

 
You need to add references to the following files:
Microsoft DTSDataPump Scripting Object Library (dtspump.rll)
Microsoft DTS Package Object Library (dtspkg.rll)

I hope this was helpful.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top