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

Differentiate between client-side and server-side validations in web pages.

0 Answers  


Which tab of the web site administration tool do you use to manage application setting ,debug and tracing?

2 Answers  


Explain the difference between webfarm and webgardens in .net?

0 Answers  


What are asynchronous callbacks ?

6 Answers   Accenture, BirlaSoft,


What is difference between ispostback and autopostback in asp net?

0 Answers  


what is new debug tools in asp.net ?

1 Answers  


How many types are there session

5 Answers   TCS,


What is IPostBack? How to use it?

0 Answers   MCN Solutions,


What is the advantage of mvc over asp.net? : Asp.Net MVC

0 Answers  


WHAT IS BOXING? HOW WE CAN USE IT?

4 Answers   Seion Infotech,


How can we prevent browser from caching an aspx page?

0 Answers  


What is cas?

0 Answers  


Categories