DTS Package2 onError event C# -
04-14-2004
, 05:56 AM
Hi
I'm trying to intercept Package2 events using C# with code based on Q319985 "HOW TO: Handle Data Transformation Services Package Events in Visual C# .NET
The onError event appears to fire correctly on row-level errors, but we are unable to retrieve detailed row-level error info. What I receive is something like
EventSource: DTSStep_DTSDataPumpTask_
ErrorCode:
Source: DTS Data Pum
Description: Error during Transformation 'DTSTransformation__2' for Row number 7. Errors encountered so far in this task: 1
HelpFile:
HelpContext:
IDofInterfaceWithError
As you can see, the description is insufficient. Basically, I want to be able to access the same level of error info (e.g. row number, detailed description) that is written to the exception file with a Transformation task, for example
@@LogSourceRows: C:\Documents and Settings\Otto\M
Documents\Projects\Avanade\DTSTest\Exception2.txt. Sourc
@@LogDestRows: C:\Documents and Settings\Otto\M
Documents\Projects\Avanade\DTSTest\Exception2.txt. Des
@@ErrorRow:
Error during Transformation 'DTSTransformation__2' for Row number 7
Errors encountered so far in this task: 1
Error Source: Microsoft Data Transformation Services (DTS) Data Pum
Error Description:TransformCopy 'DTSTransformation__2' conversion error
Conversion invalid for datatypes on column pair 1 (source column 'Table1Key' (DBTYPE_STR), destination column 'DTSKey1' (DBTYPE_I4))
Error Help File:sqldts80.hl
Error Help Context ID:3050
@@SourceRow: Logge
@@DestRow: Not Availabl
Does anyone know how to do this? (or at the very least, I need the lines beginning @@Error Row and Error Description.
Thanks
Neil |