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 bubbled event?

2 Answers  


what is the challenging situation you faced in your career?

3 Answers   Satyam, Wipro, HP, Calsoft,


Is It Possible for Static Variables access normal variable? and Normal Varialbe Access the static Variables?

1 Answers   Phoenix Technologies,


Suppose, I have 3 pages, Page1.aspx, Page2.aspx, Page3.aspx. All pages are in diff. server. When user req. for a page, Page1.aspx opens Ist & a session established. If user req. for IIn page, second session established. Similarly, 3rd session established if user req. 3rd page. In this scenario, tot. 03 sessions are established. How we can minimize it so that it will work with only one session?

3 Answers   TCS, Wipro,


How do you do exception management

1 Answers   Infosys,






What base class do all Web Forms inherit from?

1 Answers  


How to authenticate users using web.config ?

2 Answers   Cap Gemini, Accenture,


Which is the best institute in Hyderabad/Secunderabad/Andhra Pradesh to learn DotNet?

0 Answers  


what is page life cycle state management postback cross page postback types of feilds in gridview gridview events their life cycle cte in sql diff truncate and delete paging concepts in gridview diff bet gridview datalist and repeater what new operations in sql 2005 compared to earlier you get

1 Answers   e4e,


Difference between ISQL and OSQL??

1 Answers  


What is the maximum length of textbox

1 Answers  


How do you set language in web.cofig ?

3 Answers   Keane India Ltd,






Categories