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

Explain how to pass multiple tables in datasets simultaneously?

1079


How does ado.net work?

980


What is datasource in ado.net?

1119


What is sql command in ado net?

1009


What is ado.net object model?

1028


What is an orm, and why would you use one instead of plain old ado.net?

1097


How to add a check box or a dropdown list to a column in a datagrid?

1012


Which is faster dataset or datareader?

1019


What is the purpose of using adodb?

1010


What is the difference between Command and CommandBuilder object?

1338


What are three methods for displaying data in a syncfusion datagrid

1125


What is the use of SqlCommand object?

1282


How can we check that some changes have been made to dataset since it was loaded?

1015


How do you implement locking concept for dataset?

1041


What are the drawbacks of using ado.net?

1012