Answers

Question and Answer:

  Home  ADO.NET

⟩ 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?

yes this is possible

If we execute 2 select command either in stored procedure or in select command and then executereader method fired of command object. it return 2 tables in datareader.

like :

string str="Select * from a;select * from b";

cmd.commandtext=str;

dr=cmd.executereader();

Now it return 2 tables in datareader (dr).

 158 views

More Questions for you: