Retrieve transformation error code in VBScript -
10-20-2006
, 10:16 AM
I have a MultiPhase data pump. I'd like to log the official error code
and descritpion when something goes wrong, but don't know where to
begin. Can someone give me some pointer?
Here is an excerpt of my code. I'm telling it to skip the error row and
continue processing.
Function InsertFailureMain()
If Len(DTSGlobalVariables("ErrorLines").Value) = 0 Then
DTSGlobalVariables("ErrorLines").Value =
DTSGlobalVariables("CurrentLine").Value & "|"
Else
DTSGlobalVariables("ErrorLines").Value =
DTSGlobalVariables("ErrorLines").Value &
DTSGlobalVariables("CurrentLine").Value & "|"
End If
logFile.WriteLine "Error: Insert failure at data file line " &
DTSGlobalVariables("CurrentLine").Value
InsertFailureMain = DTSTransformstat_SkipInsert
InsertFailureMain = DTSTransformstat_Ok
End Function
*** Sent via Developersdex http://www.developersdex.com *** |