posted on Sunday, April 29, 2007 3:33 AM by Obi

How to execute a DTS Package

Executing a DTS package from .Net has never been simpler. Here's how:

 '----------------------------------------------------------------------------------------------------------------------
' NOTE: Requires reference to Microsoft DTS Package Object Library
'----------------------------------------------------------------------------------------------------------------------

Dim oPackage As New DTS.Package

oPackage.LoadFromSQLServer sServerName, sUID, sPWD, DTSSQLStgFlag_Default, "", "", "", "MyPackageName", 0

oPackage.Execute

Set oPackage = Nothing

Cheers,

Obi

Comments