如何使用DELPHI执行SQL SERVER 的DTS任务包? (没人回答,我要求删除此问题!) (50分)

  • 主题发起人 主题发起人 易名烦
  • 开始时间 开始时间

易名烦

Unregistered / Unconfirmed
GUEST, unregistred user!
急需请教
如何使用DELPHI执行SQL SERVER 的DTS任务包
以下代码为VB解决方案:
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

'Create the step and task. Specify the package to be run, and link the step to the task.
Set objStep = objPackage.Steps.New
Set objTask = objPackage.Tasks.New("DTSExecutePackageTask")
Set objExecPkg = objTask.CustomTask
With objExecPkg
.PackagePassword = "user"
.FileName = "C:/DTS_UE/TestPkg/VarPubsFields.dts"
.Name = "ExecPkgTask"
End With
With objStep
.TaskName = objExecPkg.Name
.Name = "ExecPkgStep"
.ExecuteInMainThread = True
End With
objPackage.Steps.Add objStep
objPackage.Tasks.Add objTask

'Run the package and release references.
objPackage.Execute

Set objExecPkg = Nothing
Set objTask = Nothing
Set objStep = Nothing
Set mobjPkgEvents = Nothing

objPackage.UnInitialize
End Sub

 
软盘安装的问题:

进入命令行窗口,指定虚拟驱动器:

Subst a: F:/newtc
^<<<<<<<<<<<<<<<<<<硬盘目录,以后用 A: 操作即可。
 
怎么取消虚拟盘!
 
俺以此问题表示关注……
 
后退
顶部