Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Execute a DTS Package From Excel VBA ?
Message
From
24/11/2005 14:49:25
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
How To Execute a DTS Package From Excel VBA ?
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01071965
Message ID:
01071965
Views:
110
I found the following codes, but something missing... I don't have the DTS choice in my list of object when I declare a variable using DIM obj AS...
What I have to do to get DTS object?

---------------------------
The following code example shows a DTS package using an ExecutePackageTask, through the Execute and UnInitialize methods:

Private WithEvents mobjPkgEvents As DTS.Package
. . .
Private Sub RunPackage()
'Run the package stored in file C:\DTS_UE\TestPkg\VarPubsFields.dts.
Dim objPackage As DTS.Package2
Dim objStep As DTS.Step
Dim objTask As DTS.Task
Dim objExecPkg As DTS.ExecutePackageTask

On Error GoTo PackageError
Set objPackage = New DTS.Package
Set mobjPkgEvents = objPackage
objPackage.FailOnError = True
Marc Levesque
La Prairie, Quebec (CANADA)
marc.levesque@videotron.ca
Next
Reply
Map
View

Click here to load this message in the networking platform