Typed datasets with multiple datatables?

  • Thread starter Thread starter Guest
  • Start date Start date
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);
 
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.
 
Back
Top