dbTalk Databases Forums  

Job Fails when setting workflow status from vbscript

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


Discuss Job Fails when setting workflow status from vbscript in the microsoft.public.sqlserver.dts forum.



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

Default Job Fails when setting workflow status from vbscript - 04-28-2005 , 02:12 PM






Hi!,
I've a DTS containing a vbscript that change another step status so as to
skip a datapump task when a source file is empty.

It works fine when executing the DTS manually, but when executing it as a
job step with the cmdexec mode, it allways return exit code= 2.

I executed it outside the job, using xp_cmdshell, and I've found that it's
the DTSRun that returns exit code 2 when in the DTS a task is skipped via
vbscript.

The code that change status is described at follow:

Set oPkg = DTSGlobalVariables("MensajeArchivoFact").Parent.Pa rent
Set oStep = oPkg.Steps("DTSStep_DTSDataPumpTask_8")
oStep.ExecutionStatus = 4 'Completed


Set oStep = oPkg.Steps("DTSStep_DTSExecuteSQLTask_2")
oStep.PrecedenceConstraints("DTSStep_DTSDataPumpTa sk_8").PrecedenceBasis = 0
oStep.PrecedenceConstraints("DTSStep_DTSDataPumpTa sk_8").Value = 4


Any idea about it ?

Thanks in advance

Leandro

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.