SQL 2005 (SSIS) Execute SQL Task Error: he result binding name must be set to zero for full result set and XML results.

I can not find any information on the following error.  I would think this would be easily resolved  Can you please help me resolve

Using SQL 2005's Integration Services,

1) I created an Execute SQL Task which does a simple select:  "select * from test.mytable".  
2) I set the Execute SQL Task's ReturnResult  to "XML"
3) I created a global scoped variable called "RecordSet" and made it type "Object"
4) using the I Execute SQL Task's pane, I mapped "NewResultSet" to "User::Recordset"
5) When I go to run the task, I get the following error:

Error: 0xC00291E3 at Execute SQL Task, Execute SQL Task: The result binding name must be set to zero for full result set and XML results.

How do I map a result set to a variable - what have I done wrong?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Try changing the name "NewResultSet" to just the number 0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vamail2Author Commented:
OHMYGOD!  What is with that?    If i wanted to save the result in several variables would I reuse 0?   When would you use "1"?

vamail2Author Commented:
And how do I use a "full result set" in a script when I retrieve it from a variable like so:

  Dts.TaskResult = Dts.Results.Success
        Dim var As Variables
        Dts.VariableDispenser.LockOneForRead("RecordSet", var)

        Dim o As Object
        o = var("RecordSet")
I think the idea is that the XML will only ever go into one recordset variable.

I'm not familiar with that piece of script but I know if you got a full resultset it would be the same - the entire recordset goes into one ADO recordset variable.

Then you can use ADO methods to navigate through it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.