Showing posts with label condition. Show all posts
Showing posts with label condition. Show all posts

Friday, February 24, 2012

For Loop Container does not check condition first time

Hi,
It seems like For Loop Container works like do-while loop in C++. I have set its EvalExpresstion to @.[User::SyncStats]==0 , I have an Execute SQL Task before this container that sets the variable to 1 but Container still executes atleast one time.

Anybody else been through this ?Curious, what happens when you set the For Loop's DelayValidation = True?|||

Phil Brammer wrote:

Curious, what happens when you set the For Loop's DelayValidation = True?


Same behavior|||Do you have anything in InitExpression?

What happens if you set the User::SyncStatus variable to 0 in the variables window and then try to run it?|||Well, There is an Execute SQL Task before the container which is responsible for initializing value on the basis of the return value from Stored Procedure.

For just the curiosity, Yes it works if I set the value in InitExpression. But I want it to use the value set by prior task.|||Well,
Silly me,

There were actually 2 variables of same name but one with Loop Container scope one with global scope.

And I wanted Loop Container to check the Global one. I changed the namespace and it works

Thanks anyways.

For Loop container - out of memory condition

Just upgraded to the June CTP and having problems executing packages that loop using a For Loop. The first pass is fine but when trying the second we get:

Error: 0xC0208296 at LeaseFact Update, Sort 2 [5197]: The input buffer could not be cloned. An out-of-memory condition occurred or there was an internal error.

Error: 0xC0047022 at (name of data flow), DTS.Pipeline: The ProcessInput method on component "Sort 2" (5197) failed with error code 0x80004005. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.

Anyone seen this kind of problem ?

Thanks

Known issue, see other post I did WRT this issue please.