Re: How to force a SSIS package step to fail?
- From: "Steen Schlüter Persson (DK)" <steen@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 12 Mar 2008 15:46:36 +0100
I've now tried to add an Expression to the Precedence Constraints, bit I have some troubles defining the Varible it's going to look at..:-(.
My Stored Procedure returns a character value ("Success" or "Failure"), but when I set the step to return the value to the type String, then I get an "String[0]: the Size property has an invalid size of 0" error everytime I execute the task.
Just for the test, I've tried to do the same when returning an INT value and that is working fine.
When I define the Variable in my packages as a String, I can't see that I can enter any size anywhere, so how do I get around this error?
Regards
Steen
Steen Schlüter Persson (DK) wrote:
Hi J,.
I've also looked into this solution and it might also be what I'm going to do. I just thought that there was another way where I could force the step to fail and then use the "original" Success/Failure/Completion constrain.
Regards
Steen
jhofmeyr@xxxxxxxxxxxxxx wrote:Hi Steen,
Why would you want the package to fail? In DTS (SQL Server 2000) you
could "fail" steps in order to control package flow, but his is not
necessary in SSIS. If you want the package to follow a different
control flow depending on the outcome of the stored procedures, you
can use conditional expressions based on the return values.
To do this, double-click on the connector line joining 2 of your
ExecuteSQL tasks and change the "Evaluation operation:" to any of the
options that include "Expression". This enables you to enter a
boolean expression that must evaluate to true for the path to be
followed. Assuming you've got an int parameter called "sp1rtnvalue"
which must evaluate to 1 for the flow to continue; your expression
would be:
@sp1rtnvalue == 1
Good luck!
J
- Follow-Ups:
- Re: How to force a SSIS package step to fail?
- From: jhofmeyr
- Re: How to force a SSIS package step to fail?
- References:
- How to force a SSIS package step to fail?
- From: "Steen Schlüter Persson (DK)"
- Re: How to force a SSIS package step to fail?
- From: jhofmeyr
- Re: How to force a SSIS package step to fail?
- From: "Steen Schlüter Persson (DK)"
- How to force a SSIS package step to fail?
- Prev by Date: RE: SSIS Expression Builder Replace function
- Next by Date: Error msg and lack of password save on FTP task in SSIS
- Previous by thread: Re: How to force a SSIS package step to fail?
- Next by thread: Re: How to force a SSIS package step to fail?
- Index(es):
Relevant Pages
|