Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们在 SSIS - 脚本任务中使用在 VB.NET 中创建的库来执行各种与数据库相关的活动。
当从包内调用 VB.NET 类库引发异常时,如何强制 SSIS 包失败?
http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/4ca66ffa-0005-40fe-96aa-58b1959a8120/
“根据您如何配置包的其余部分,您有以下选项(可能更多):
Dts.TaskResult = (int)ScriptResults.Failure;
Dts.TaskResult = CInt(ScriptResults.Failure)
throw new Exception()
Throw (New Exception())
选项 1 要求您的其余组件通过成功优先约束连接到脚本。”