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
 
sloan said:
One way:

Create strong (typed) datasets, and populate them.

I'm too lazy for this.
It's why we have computers to make our job easier.

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.
 

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

Back
Top