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

If i have 1000 records in dataset, how to do paging?

2 Answers   Mind Tree,


What is the difference between application object and session object?

4 Answers   IBS,


Why Web Services?

1 Answers  


How to execute a stored procedure.and how to call it form a asp page

2 Answers  


Explain how cookies work.

0 Answers  






which scripting is used browser by server when we use validation controls. 1.javascript 2.vbscript 3.jscript 4.perl

8 Answers   Satyam,


How to create multi language website in asp.net mvc? : Asp.Net MVC

0 Answers  


Explain the asp.net session state modes.

0 Answers  


when using personlization, how do you access over setting at runtime?

1 Answers  


what are the components available in global.asax ?

1 Answers  


How to use push notification?

0 Answers   MCN Solutions,


There is a login page that has two text boxes with required field validators on it. The page has a login and cancel button. How can we ensure that the click on the cancel button doesnt fire a validation event.

2 Answers   Proteans,


Categories