If you are using two select queries and retrieving data. how
do you access second query's result set using data reader?



If you are using two select queries and retrieving data. how do you access second query's resu..

Answer / uday kumar vuriti

If we have 2 select queries as follws
select * from dept
select * from emp

SqlDataReader dr;

//To Read 1st Select query dept
dr.Read();

//To Read 2nd Select query emp
dr.NextResult();

So the answer is dr.NextResult();

Is This Answer Correct ?    27 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What is an axd file?

0 Answers  


What object is used to encapsulate a rowset? a) DataSet b) DataAdapter c) DataRowSet d) DataTable

2 Answers   Syntax Softtech,


Where would you use an ihttpmodule, and what are the limitations of any?

0 Answers  


Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?

3 Answers   HCL, Wipro,


What does asp in asp.net stand for?

0 Answers  






What is difference between cache and session?

0 Answers  


what are partial classes and their use?

1 Answers   Patni,


How do you change the session time-out value?

0 Answers   TryTechnicals Pvt Ltd,


Can you explain composite pattern?

0 Answers   QuestPond,


What is the use of the tag in the web.config file?

0 Answers   MindCracker,


How to automatically get the latest version of all the asp.net solution items from source safe when opening the solution?

0 Answers  


Explain diff. Betn dataset and recordset?

0 Answers  


Categories