 |
boit Level: Scholar
 Registered: 28-04-2005 Posts: 43
|
trapping dts status
1. i have an sql-dts module called in vb. how can i know if the sql-dts module has completed its purpose when executed in vb? as i understand it, vb sends this module as a batch of command to the sql-database, then sql-database processes the batch asynchronously. the next line of command in vb is triggered independent of the result of the sql-dts module batch.
can i trigger succeeding lines of commands when i know that the sql-dts module completes first?
2. likewise, in executing a shell command. can i know if the shell command is completed first before i proceed with other lines of commands?
thanks in advance
|
|
21-07-2005 at 01:22 AM |
|
|
steve_w Level: Moderator

 Registered: 18-04-2003 Posts: 1156
|
Re: trapping dts status
Hi
I think I can help you with the dts bit.
If you declare your dts package as below
Option Explicit
Private WithEvents dtsp As DTS.Package |
then you will get the following events available
Private Sub dtsp_OnError(ByVal EventSource As String, ByVal ErrorCode As Long, ByVal Source As String, ByVal Description As String, ByVal HelpFile As String, ByVal HelpContext As Long, ByVal IDofInterfaceWithError As String, pbCancel As Boolean)
End Sub
Private Sub dtsp_OnFinish(ByVal EventSource As String)
End Sub
Private Sub dtsp_OnProgress(ByVal EventSource As String, ByVal ProgressDescription As String, ByVal PercentComplete As Long, ByVal ProgressCountLow As Long, ByVal ProgressCountHigh As Long)
End Sub
Private Sub dtsp_OnQueryCancel(ByVal EventSource As String, pbCancel As Boolean)
End Sub
Private Sub dtsp_OnStart(ByVal EventSource As String)
End Sub |
Steve
|
|
21-07-2005 at 11:13 AM |
|
|
boit Level: Scholar
 Registered: 28-04-2005 Posts: 43
|
Re: trapping dts status
Thanks Steve.More success to you
|
|
21-07-2005 at 10:39 PM |
|
|
|
|
 |
 |