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?
Submitted by: Administratoryes 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).
Submitted by: Administrator
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).
Submitted by: Administrator
Read Online ADO.NET Job Interview Questions And Answers
Top ADO.NET Questions
☺ | Which one of the following objects is a high-level abstraction of the Connection and Command objects in ADO.NET? |
☺ | Difference between SqlCommand and SqlCommandBuilder? |
☺ | Can dataReader hold data from multiple tables? |
☺ | What provider ADO.net use by default? |
☺ | What is different between SqlCommand object and Command Behavior Object? |
Top Dot Net Technologies Categories
☺ | MSF Interview Questions. |
☺ | .Net Architecture Interview Questions. |
☺ | ASP.Net MVC Interview Questions. |
☺ | Entity Framework Interview Questions. |
☺ | C# (Sharp) Programming Language Interview Questions. |