DataTable by name not index

  • Thread starter Thread starter M.H.
  • Start date Start date
M

M.H.

Hi there,

I have an SQL that returns number of datasets.
Something like that

SELECT * FROM A
SELECT * FROM B WHERE B_ID > 100

In my C# code I would like to access those two sets by a name instead
of index of a table

- Tables["A"], Tables["B"] instead of Tables[0], Tables[1].

How can I 'attach' a name to my DataTables?

MH
 
Hi,

One way would be to populate table names in code right after the select is
done.
AFAIK You can't do it automatically thought.
 
Back
Top