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

how we declare interface

2 Answers  


Describe a diffgram ? Write any one use of that?

3 Answers   Siebel,


Where do we store our connection string in asp.net application?

0 Answers  


What is meant by asp.net?

0 Answers  


What is the difference between c# and .net?

0 Answers  


# What is the transport protocol you use to call a Web service?

1 Answers  


Where does Web.Config Info stored? Will this be stored in the registry?

4 Answers   Accenture,


Can any one explain with the example how to capture the application error in Aplication_Error() method?

1 Answers   Infosys,


Explain how caching in asp.net 2.0 is different from caching in asp.net 1.1?

0 Answers  


what are partial classes and their use?

1 Answers   Patni,


Which is the parent class of the web server control?

0 Answers  


Suppose i create one application in vs 2008 and it is running in the latest version of IE,will it run in netscape and other browsers with low version?

2 Answers   Wipro,


Categories