dbTalk Databases Forums  

Execute a Step

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Execute a Step in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Elias Horne
 
Posts: n/a

Default Execute a Step - 07-16-2006 , 01:56 PM






Hello,

In DTS, if you right-click a step, there is a command called "Execute Step".

How do you do the same thing from Active X scripting?

Regards,
Elias



Reply With Quote
  #2  
Old   
Davide
 
Posts: n/a

Default Re: Execute a Step - 07-17-2006 , 08:37 AM






Hello Elias,

Quote:
Hello,

In DTS, if you right-click a step, there is a command called "Execute
Step".

How do you do the same thing from Active X scripting?

Regards,
Elias
Suppose you have two steps(step1 is an ActiveX script and step2 is disabled
by default) :

To execute step2 from step1 ActiveX script , you 'd have:

'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************

Function Main()


Dim gvs 'As DTSGlobalVariables
Dim gva 'As DTSGlobalVariable
Dim pkg 'As DTSGlobalVariables.parent
Dim stp 'As Step



Set gvs = DTSGlobalVariables
Set pkg = DTSGlobalVariables.parent

set stp = pkg.Steps("step2")
stp.DisableStep = False
stp.ExecutionStatus = DTSStepExecStat_Waiting
set stp = nothing
Main = DTSTaskExecResult_Success
End Function




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.