| |
GeekInterview.com > Interview Questions > Microsoft > Ado.NET
| Print | |
Question: retrieve two tables of data at a time by using data reader
Answer: One interview I faced a Q: how can i retrieve two tables of data at a time by using data reader? Data reader read and forward only, how is
it possible to get 2 tables of data at a time |
| July 07, 2008 12:46:23 |
#8 |
| drsudhak |
Member Since: July 2008 Total Comments: 1 |
RE: retrieve two tables of data at a time by using data reader |
Theoritically not possible.because data reader holds only one result set.
But you can get data from 2 tables into data reader using union or union all in select statement of SqlCommand. |
| |
Back To Question | |