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:
- I check my main table which widgets have been added.
- I run through each row and build the ‘batch’ sql query that gets content from mulitple tables.
- Call the completed list of queries.
- I populate in a DataSet.
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?
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.