Sunday, March 11, 2012

Deadlock accessing variables

I am trying to access a single variable in a script and a deadlock error continues to come up. I have a single string variable that is added to the readwritevariables collection in the editor. I am trying to execute the following code:

Dim variables As Variables

Try

Dts.VariableDispenser.LockForWrite("Test")

Dts.VariableDispenser.GetVariables(variables)

Catch ex As Exception

Throw ex

Finally

variables.Unlock()

End Try

I have installed Service Pack2 and this error continues. I know it has been posted on before and I appreciate any help.

Thanks

You shouldn't need to lock the variable in your script if you've added it in the editor. Try either removing the lock in your script or removing the variable in the editor.|||

Thank you. It took me awhile but I figured it out. If I was smart enough to read the error I would have figured it out sooner.

Thanks again

No comments:

Post a Comment