If you are using two select queries and retrieving data. how
do you access second query's result set using data reader?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Define authentication and authorization.

598


What is the good practice to implement validations in aspx page?

602


What's the difference between viewstate and sessionstate?

537


How can we communicate with each server in N-tier Architecture? and what are the methods?

1766


What does mean by a neutral culture?

574






Will the asp.net validators run in server side or client side?

614


What is application variable in asp.net?

443


What is difference between cache and session?

479


What are the new features added from ASP to ASP.NET?

547


What will happen if the server confugration file and the application confugration file have different values for sassion state ASP.NET?

719


Define what is razor? : asp.net mvc

552


Please brief not about xsd,xslt & xml?

528


What is repository pattern in mvc.net? : asp.net mvc

506


What is server infrastructure & server components?

751


In which event of page cycle is the viewstate available?

547