Reputation: 12541
I have built a backend system that allows a user to add multiple content section, widgets etc.
I want to keep the queries to the SQL server to a minimum for performance reasons, this is my current flow:
Now for the problem:
The tables will never be in the same order, and I can't find a way to name the returned tables.
Is it best to just dedicate a column in each returned DataTable to specify what it actually is, and loop through the DataSet?
Or is there actually a way of naming the returned tables?
Upvotes: 3
Views: 323
Reputation: 12541
Nobody replied with an answer for specifying DataTables in a DataSet, so I ended up adding a Column to each DataTable making it unique and "searchable" solving my problem.
Upvotes: 0
Reputation: 1409
There is no way to do it automatically, as far as I know. You can give table mappings a try -> http://geekswithblogs.net/dotNETvinz/archive/2009/08/03/why-dataset-creates-tablen-as-the-default-table-name.aspx
Upvotes: 1