Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Problem excecuting store thats return multiple result sets Expand / Collapse
Author
Message
Posted Tuesday, October 22, 2013 9:05 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, August 28, 2015 1:27 PM
Points: 2, Visits: 23
hello


i have a store procedure that return multiple datasets i want to manipulate one of theses datasets to input in a datatable is this posible and how


plese help me
Post #1507205
Posted Tuesday, December 10, 2013 1:20 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, March 25, 2015 3:16 PM
Points: 1,001, Visits: 162
are you asking about the .net development side of it?

if yes, you can take a look at this one:
http://www.codeproject.com/Articles/675933/Returning-Multiple-Result-Sets-from-an-Entity-Fram
this is using a stored proc in an EF model.




Aram Koukia: http://www.koukia.ca
Post #1521655
Posted Tuesday, December 10, 2013 1:37 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 5:21 AM
Points: 13,970, Visits: 36,242
basically, you assign the results to a DataSet; since a DataSet contains a collection of DataTable,s you can then iterate through each datatable, or assign, say a grid's datasource to DataSet.Tables[0], for example.

  Dim ds As New DataSet
ds = SqlHelper.ExecuteDataset(Me.ConnectionString, CommandType.Text, sql)
For Each dt As DataTable In ds.Tables
'do something with the results, like export?
Next


Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Post #1521659
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse