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 to use DevExpress controls

1 Answers  


Define WCF ABC , Diffrent Contract. Diff b/w Wcf and in webservice

2 Answers   Syntel,


How to configure a website without using IIS.

3 Answers   CGI,


Which tool you have done?

0 Answers  


The question is "After sign out from email, Then we click a back button , we can't go to the previous page ie inbox page, It is displaying a login form only" My doubt is How will code this , If u know please blog me through this or my mail. my mail id is yoursguna@gmail.com

3 Answers   TCS,






How to Deploy a project?

2 Answers  


What is the difference between Debug.Write and Trace.Write? When should each be used?

2 Answers   Infosys,


what does Page.IsValid in asp.net

6 Answers   Infosys, Net Solution,


WHAT IS polymorphism

2 Answers   Fidelity,


How to convert a string into an Integer in ASP.net?

12 Answers  


How Clustered Index and Non clustered index stored on SQL server?

2 Answers   TCS,


What is Difference between Application object and Session Object

5 Answers  






Categories