Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have an Execute SQL task which gives returns only one row with one column - a number. I set my result set to single row. Despite that, the task fails. Why ? How do I fix it ?

[Execute SQL Task] Error: There is an invalid number of result bindings returned for the 
ResultSetType: "ResultSetType_Rowset".
share|improve this question
    
Did the SQL you executed return no result sets at all? Are the result sets bound on the Result Sets page? –  Jon Seigel Sep 29 '13 at 13:37
    
@JonSeigel - It returned a number inside SQL server. I don't understand the meaning of the second question. –  gregnorm Sep 29 '13 at 15:42
1  
Edit the Execute SQL task; on the left side in the list, select Result Set. Did you map the result set to a variable on that page? –  Jon Seigel Sep 29 '13 at 19:54
    
And if you've mapped the output to a variable, what is the data type of the variable you've mapped to? –  billinkc Sep 30 '13 at 14:37
    
@JonSeigel - yes, i did that and it works never figured out other things. –  gregnorm Sep 30 '13 at 17:12
show 6 more comments

1 Answer

up vote 0 down vote accepted

In the Execute SQL Task, when the Result Set property is set to any value except None, the result set(s) must be mapped on the Result Set page, as shown below.

The "Result Name" column is a bit misleading; what's actually required is a zero-based number.

enter image description here

Unfortunately, none of these requirements are validated at design-time, so the editor will happily let you click OK without entering all the necessary information.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.