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 are the intrinsic objects present in ASP.NET

1 Answers   IBM,


Explain Life cycle of ASP.NET page when a request is made.

0 Answers  


Differentiate between globalization and localization.

0 Answers  


What is viewstate parameter?

0 Answers  


How do you declare static variable? What is its lifetime?

0 Answers  






What is the difference between dispose() and finalize()?

0 Answers  


How many types of web application ?

1 Answers  


How does u call and execute a sp in .net?

0 Answers  


Briefly describe different techniques for ASP.NET State Management?

6 Answers   Deloitte, Syntax Softtech,


What is the use Membership in asp.net? and What is the use profiler in asp.net?

1 Answers  


What is the first name space in .netF/W heirarchy

3 Answers   Wipro,


When do you set "<IDENTITY impersonate="true" />" ?

1 Answers  


Categories