Typed datasets with multiple datatables?

G

Guest

Using the typed dataset designer, I dragged an existing stored procedure onto
it which has several select statements in it

For simplicity, something like:

select * from table1
select * from table2
select * from table3

It seems the designer generates on datatable based on the first select
statement only.

How do I return the entire dataset and iterate through the tables? Based on
code I've seen below, you can only return on databable? Thanks for any help
on this.

NorthwindDataSetTableAdapters.CustomersTableAdapter customersTableAdapter =
new NorthwindDataSetTableAdapters.CustomersTableAdapter();

customersTableAdapter.Fill(northwindDataSet.Customers);
 
E

Earl

This is the second question this week on this exact subject -- to the best
of my knowledge, what you are trying to do is not possible. The problem
isn't "typed datasets" or "multiple datatables", the problem specifically is
trying to create drag and drop datatables from a stored procedure that
contains multiple selects. I recommend that you place the 3 select
statements in their own sprocs, then exec those from a master sproc. Then
you can drag-and-drop with the individual sprocs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top