Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
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, November 29, 2013 10:45 AM
Points: 2, Visits: 22
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
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 10:28 AM
Points: 831, Visits: 155
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 @ 2:46 PM
Points: 12,744, Visits: 31,065
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1521659
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse