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 is a web pool?

0 Answers  


How can we apply themes to an asp.net application?

0 Answers  


What is view state management in asp net?

0 Answers  


What is HTTPModule and HTTPcontext? What is the use of each?

0 Answers   Accenture,


Is asp.net free?

0 Answers  


Explain login controls.

0 Answers  


Describe session handling in a webfarm, how does it work and what are the limits?

0 Answers   Siebel Systems,


Can we use http handlers to upload a file in asp.net?

2 Answers  


Explain the advantages of caching?

0 Answers  


How can we Maintain more than on config file in one .Net web application and how?

1 Answers   USi,


what are the events in ASP.net page life cycle?

1 Answers  


Where session id is stored?

0 Answers  


Categories