문제

I've got a script running in a Foreach Loop Container, inside my package's Control Flow.

In the script, I am throwing a warning, then exiting with success

Dts.Events.FireWarning(-1, "", "warning message here", "", 0);

Dts.TaskResult = (int)ScriptResults.Success;

I've set the system Propagate variables all to false.

Also tried setting the Package property DisableEventHandlers to True.

Variables

However, duplicate warning messages are still being thrown in the order of:

  1. Script
  2. Foreach Loop Container
  3. Package

I could possibly log each incident as Information instead of a Warning... but I dont want to log all Information. Logging all Warnings is much more realistic.

도움이 되었습니까?

해결책

Create an OnWarning Event Handler for your script task. The event handler does not need any tasks of its own, but it does need its system variable Propagate set to False.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top