Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we bind one datareader wid two dropdown list?

Answer Posted / anup kumar

yes, it is posible. by using NextResult() method of
sqldatareader.

sqlcommand cmd = new sqlcommand("select id from emp ; select
dptid from dpt",YourConnection);
//check connection status and open the connection
if(rdr.hasrows)
{
//read id from emp
}
if (rdr.HasRows() == true)
{
//read dptid from dpt
}
//close the connection

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between OLEDB and SQLClient Providers?

1143


How would you connect to database using .NET?

1026


What does executereader return?

964


How do you connect to sql server database without using sqlclient?

1102


What is the use of connection object in ado.net?

1049


What are dcl commands?

1005


What is ole db and odbc?

914


What is connection string?

998


Explain executenonquery?

1125


What are the drawbacks of using ado.net?

967


What are the different row versions available in table?

964


What is data view and variable view?

903


Explain ODP.net

993


What are the data providers in ADO.NET framework?

1023


What connected data?

949