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

Posted on 2006-04-09
Last Modified: 2007-12-19
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?

Question by:vamail2
    LVL 30

    Accepted Solution

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

    Author Comment

    OHMYGOD!  What is with that?    If i wanted to save the result in several variables would I reuse 0?   When would you use "1"?


    Author Comment

    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")
    LVL 30

    Expert Comment

    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.

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    This is my first ever Article on EE or elsewhere; therefore, please bear with me if I have some discrepancies in my writing. I read many articles and questions related to "how to pass values to SSIS packages at run-time?"  Hence, this common ques…
    The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now