DataTable by name not index

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
 
M

Miha Markic

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top