SQL Server 2000.
I am building a generic error trapping routine in the last step of a DTS Package. The problem I am getting in the early stages is that this form of the command works:
.GetExecutionErrorInfo (lpErrorCode)
This form does not
.GetExecutionErrorInfo lpErrorCode, ErrSource,ErrDescription
It complains about a type mismatch.
The ErrSource and ErrDescription are of course where the
valuable information is stored. Thanks.
Full code here:
The risk with keeping an open mind is having your brains fall out.
Shaunk
I am building a generic error trapping routine in the last step of a DTS Package. The problem I am getting in the early stages is that this form of the command works:
.GetExecutionErrorInfo (lpErrorCode)
This form does not
.GetExecutionErrorInfo lpErrorCode, ErrSource,ErrDescription
It complains about a type mismatch.
The ErrSource and ErrDescription are of course where the
valuable information is stored. Thanks.
Full code here:
Code:
Function Main()
Main = DTSTaskExecResult_Success
'*****Call Email_Status("","Success","Process HL7 Batch Files", "All completed ", strEmail_Extra_Text)
iStatus = True
Dim lpErrorCode
Dim ErrSource
Dim ErrDescription
lpErrorCode = -1
Dim oPackage
set oPackage = DTSGlobalVariables.parent
For i = 1 To oPackage.Steps.Count
If oPackage.Steps(i).ExecutionResult = DTSStepExecResult_Failure Then
With oPackage.Steps(i)
'.GetExecutionErrorInfo lpErrorCode, ErrSource, ErrDescription
.GetExecutionErrorInfo (lpErrorCode)
msgbox oPackage.Steps(i).Name
msgbox lpErrorCode
End With
iStatus = False
End If
Next
End Function
The risk with keeping an open mind is having your brains fall out.
Shaunk