March 4, 2009 at 8:31 am
Hi, I want capture a error in some task and it saves in a log table. How can I save in a variable, this error?
eg.
[Bulk Insert Task] Error: An error occurred with the following error message: "Bulk load data conversion error (truncation) for row 1, column 5 (IdentificationTypeAffiliate).".
I use event handles, when my bulk insert task failed.
Event: On Error and insert inside the log table.
Thanks....
March 4, 2009 at 5:11 pm
Put a script component in your event handler and reference these system variables as read only:
ErrorDescription,ErrorCode,SourceName
Enter some of your own variable as read/write
separate all variables with a comma on the editor screen.
In your script component you can reference these by using the following
' this will assign the error description system value to
' your user variable called MyvarErrorDesc
Dts.Variables("MyVarErrorDesc").Value = Dts.Variables("ErrorDescription").Value.ToString
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply