DAAB - return table alias from ExecuteDataSet

Topics: Data Access Application Block
Aug 5, 2008 at 8:46 PM
We are returning several tables in some of our DataAccess code. Is there a way to return a dataset that has the tables already named.

select id, name, ssn from employees where active = 1 as employees_active_subset;
select id, name, ssn from employees where active = 0 as employees_inactive_subset;

with:

ds.Tables[0].TableName you get "TableName". I want to retrieve "employees_active_subset". Thanks.
Aug 6, 2008 at 5:32 AM
No in a way that takes advantage of the names set in the SQL query. You can however use the LoadDataSet() method to provide the table names for each result set.

Fernando