Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 21, 2012 12:11 AM by Lesthad_mk
Apr 20, 2012 09:31 PM|LINK
I'm working with ASP.Net, C# and SLQ Server. So far, I have created a Store Procedure that return one result set.
Then, I created a type dataset from my application and I configured it to read the data from the Store procedure. At this point, everithing is working OK.
But now, I would like to add a new query to the Sproc to return two result sets. However doing this, now I'm not sure how I can configure my type dataset to support multiple result set.
So the questions are:
1.- Is that posible?
2.- Is there a better way to achieve it?
Any suggestion or clue would be very helpful
Thanks and Regards!
Apr 20, 2012 09:43 PM|LINK
please make it clear result returned from store procedure is singlton value or record set .
Apr 20, 2012 09:48 PM|LINK
I forgot to mention that. Well, in this case both of them. The first result is a scalar value and the second one is a record set.
Apr 21, 2012 12:11 AM|LINK
I have solve it, using an SqlDataAdapter instead of a TableAdapter (which can be generated when adding a type dataset). I leave my type dataset but this time without the tableAdaperte (Fill(9 and GetDAta()).
Then I used the Fill() method from the SqlDataAdapter I created. In that way you can get multiple resultSet from a Stored Prodcedure :-)
I found the folowing link where it's explained a little better.
Hope this help ;-)