December 9, 2004 at 8:33 am
I want to mark a step as succeeded after it fails so that when a DTS package finishes execution the job that executed does not get marked as failed.
I use the following in an ActiveX Script Task to see the execution result:
'**********************************************************************
' Visual Basic ActiveX Script
'************************************************************************
Function Main()
Dim oPkg
Set oPkg = DTSGlobalVariables.Parent
MsgBox oPkg.Steps("DTSStep_DTSCreateProcessTask_1").ExecutionResult
Main = DTSTaskExecResult_Success
End Function
Next I put this statement after the MsgBox one:
oPkg.Steps("DTSStep_DTSCreateProcessTask_1").ExecutionResult = DTSStepExecResult_Success
When I execute the package again I get the following error:
Error Code: 0
Error Source= Microsoft VBScript runtime error
Error Description: Wrong number of arguments or invalid property assignment: 'oPkg.Steps(...).ExecutionResult'
Does this mean I am not allowed to change this variable? Or am I simply not doing it right?
The task that fails is an Execute Process Task which is set to time out if it can't complete the batch file execution within a designated time period. On timeout the task gets marked as failed which is what I want. The task that executes on failure is an e-mail gets sent to my in box at work. Unfortunately that failure mark also marks the job as failed which sends an e-mail to my pager and wakes me up in the middle of the night. This morning while pondering the problem, I thought I could do what I described above. I am useing SQL Server 2000. If anyone has any other ideas on how to do this your suggestions are welcome.
Robert W. Marda
Billing and OSS Specialist - SQL Programmer
MCL Systems
December 9, 2004 at 11:01 pm
From Microsoft: This Property is Read-only, so nothing is wrong.
If you not don´t want receive that notification simply disable that feature from Job.
Regards
:.::.:.::
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply