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

Define connection string?

1076


Which is the best method to get two values from the database?

969


Which is faster ado.net or linq?

1027


What is ado.net and its architecture?

1178


What are the different ado.net namespaces?

1069


Which one of the objects is a high-level abstraction of the connection and command objects in ado.net?

1153


Explain the various objects in dataset.

999


What is a sqldataadapter?

998


How is entity framework different from ado.net?

956


What is the default provider in ado.net?

966


How to store data in memory?

955


What is ado.net and its features?

984


Define bubbled event?

940


What is the difference between ADO and ADO.Net?

1085


How to perform sorting on a table in ADO.NET?

1033