Multiple Result Sets
If your SelectCommand returns multiple tables, Fill will automatically
generate table names with incremental values for the tables in the DataSet,
starting with the specified table name and continuing on in the form
TableNameN, starting with "TableName1". You can use table mappings to map
the automatically generated table name to a name you want specified for the
table in the DataSet. For example, for a SelectCommand that returns two
tables, Customers and Orders, issue the following call to Fill.
custDA.Fill(custDS, "Customers")Two tables are created in the DataSet:
Customers and Customers1. You can use table mappings to ensure that the
second table is named Orders instead of Customers1. To do this, map the
source table of Customers1 to the DataSet table Orders, as shown in the
custDA.Fill(custDS, "Customers")Hope this helps.
"Jim" <ssss> wrote in message news:eZ3nDHuPDHA.3236TK2MSFTNGP10.phx.gbl...the> I have a stored procedure that queries a sql server database and returnsmany> multiple data tables ( 7 to be precise) these tables are the results ofdata> joins.
> When I use the System.Data.SqlClient namespace objects to access thishelp?> it is returned intoa dataset, this dataset has the tables as expected but
> they are name 'Table', 'Table1' , 'Table2' etc....
> How can I ge the table name to be more friendly as in "Customers", "Rates"
> etc, I was thinking of modifying the sql stored procedure, can anyone>