• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4008
  • Last Modified:

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?

0
vamail2
Asked:
vamail2
  • 2
  • 2
1 Solution
 
nmcdermaidCommented:
Try changing the name "NewResultSet" to just the number 0
0
 
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"?

Thanks!
0
 
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")
0
 
nmcdermaidCommented:
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.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now