![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
What I would do is to have two separate objects, with different workflow paths to them: one would lead to the code/object if the prior task completed |
|
Regards, John Miceli |
#4
| |||
| |||
|
|
Welcome to the world of Windows programming. Twice as much code for half the results ;-) Looking back I can see how my previous response could be confusing, so allow me to try and speak (type?) clearer: Task 1 contains code that performs say 3 things in TSql. The object also needs additional code that check to see (@@error) if prior code finished |
|
We break each process into separate tasks with an 'On Success' workflow between them so that we can log each step and interrupt the process |
|
Hopefully, that wasn't clear as mud and proves useful. Regards, John Miceli |
#5
| |||
| |||
|
|
Welcome to the world of Windows programming. Twice as much code for half the results ;-) Looking back I can see how my previous response could be confusing, so allow me to try and speak (type?) clearer: Task 1 contains code that performs say 3 things in TSql. The object also needs additional code that check to see (@@error) if prior code finished |
|
We break each process into separate tasks with an 'On Success' workflow between them so that we can log each step and interrupt the process |
|
Hopefully, that wasn't clear as mud and proves useful. Regards, John Miceli |
#6
| |||
| |||
|
|
Well, I've just discovered a way to capture exception information while continuing row processing in TransformError (this workaround accomplishes what most people want DTSTransformStat_SkipRowInfo to do): Begin by setting the MaximumErrorCount to 0. The task should fail once any kind of error is raised. In your TransformError phase, after handling the error, add: Dim oTask, i Set oTask = DTSGlobalVariables.Parent.Tasks("DTSTask_DTSDataPu mpTask_16") i = oTask.Properties("MaximumErrorCount").Value oTask.Properties("MaximumErrorCount").Value = i + 1 Set oTask = Nothing Finally, return: TransFailureMain = DTSTransformStat_ExceptionRow You will get: 1. Detailed context info in the exception log file configured for this task. 2. The ability to continue processing, skipping the bad row. 3. Safety, knowing that errors for which you haven't defined error handling will still cause the task to fail. Moderator: Feel free to add this to your FAQ. "John Miceli" <jmiceli (AT) wrberkley (DOT) com> wrote in message news:26F9ADFD-9424-470E-9BD2-EBB927A80A3E (AT) microsoft (DOT) com... Welcome to the world of Windows programming. Twice as much code for half the results ;-) Looking back I can see how my previous response could be confusing, so allow me to try and speak (type?) clearer: Task 1 contains code that performs say 3 things in TSql. The object also needs additional code that check to see (@@error) if prior code finished correctly. Each individual piece of code must be checked because the @@error will reset with any processing of code. We break each process into separate tasks with an 'On Success' workflow between them so that we can log each step and interrupt the process depending on the error and tailor error messages. We don't really need this level of granularity, but hey, I didn't write it; I just inherited it. We also log each step into a logfile with a standardized form for debugging purposes. We have a stored procedure that does the error reporting processing to the log file. If this code would be of assistance I can forward it to you. Hopefully, that wasn't clear as mud and proves useful. Regards, John Miceli |
#7
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |