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

What parameters can you pass in the url of the api? Can get and post use the same url?

743


What is the significance of proxy user?

808


Explain the different types of directives in .net?

706


What should you do is you want to remove an existing component but would like to make some funtionalities?

1730


What is the difference between runtime version and version?

758


Can I read the hard disk serial # of the client computer using asp.net?

751


How does exception management works in ASP.NET?

844


Can we override the enablepartialrendering property of the scriptmanager class?

880


Can you use Web API with ASP.NET Web Form?

871


What symbol specifies the beginning of a query string?

730


What are type/key pairs in client script registration? Can there be 2 scripts with the same type/key pair name?

740


Will the asp.net validators run in server side or client side? How do you do client-side validation in .net?

695


Explain about asp.net 2.0 themes?

729


Should I delete cookies?

723


Difference between DataGid and Girdview? Difference b/w .Net 2.0, 3.0 and 3.5 ? Diff b/w dispose & Finialize Methods?

2260