C# Store SPROC data in DataTable

I am calling a sproc which is returning three tables.  How do I store each in a datatable?
LVL 2
CipherISAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .Net DeveloperCommented:
You can look here:
http://social.msdn.microsoft.com/Forums/en-US/cdaee35a-f18d-4c7c-bcfd-a6c29d2a0c62/reading-multiple-result-sets-returned-by-stored-proc-in-c?forum=adodotnetdataproviders


Essentially create a dataset which is the result of your stored proc.

The dataset is an array of datatable which can then be accessed.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CipherISAuthor Commented:
Figured it out

protected DataSet myData = new DataSet();

myAdapter.Fill(myData);
myData.Tables[0].TableName = "T1";
myData.Tables[1].TableName = "T2";

Open in new window

0
CipherISAuthor Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for CipherIS's comment #a39574601

for the following reason:

figured it out
0
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Kyle AbrahamsSenior .Net DeveloperCommented:
This is exactly what my answer aluded to.
0
Jacques Bourgeois (James Burger)PresidentCommented:
CipherIS figured it out 3 hours after ged 325 gave the answer?

ged325 should have the points.
0
Kyle AbrahamsSenior .Net DeveloperCommented:
2nd time user is trying to close the question.  Please accept the solution.
0
Kyle AbrahamsSenior .Net DeveloperCommented:
Thanks all.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.