Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


Can we bind one datareader wid two dropdown list?

Answers were Sorted based on User's Feedback



Can we bind one datareader wid two dropdown list? ..

Answer / pradip humane

Yes,we can bind the one datareader with two dropdownlist.
because datareader just read the data and forward the
data,that's why there is no problem for binding with two
dropdown list with one reader

Is This Answer Correct ?    16 Yes 4 No

Can we bind one datareader wid two dropdown list? ..

Answer / 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

Can we bind one datareader wid two dropdown list? ..

Answer / ak

It is simple


if(reader.hasrows)
{
combo1.additem(reader[0])
combo2.additem(reader[1])
}

Is This Answer Correct ?    2 Yes 2 No

Can we bind one datareader wid two dropdown list? ..

Answer / rmishra

We can bind the same Datareader to different drop downs but
the constraint is that it will show the same data for both
the dropdown ie if the datareader fetches the city data for
one dropdown then it will show the same data for second one

Is This Answer Correct ?    2 Yes 4 No

Can we bind one datareader wid two dropdown list? ..

Answer / vivek

data reader has no multiple binding because when it is
binded to multiple controls navigation problem
araises.because it is forward only.
so,multiple binding is perfectly possible with dataset only

Is This Answer Correct ?    0 Yes 4 No

Post New Answer



More ADO.NET Interview Questions

What is connection pooling and what is the maximum pool size in ado.net connection string?

0 Answers  


Explain how can we load multiple tables in to dataset?

0 Answers  


What is the difference between Dataset. clone and Dataset.copy?

0 Answers  


What are the different ado.net namespaces are available in .net?

0 Answers  


can anybody show me the structure of ADO.NET

1 Answers  






what are the differences between dataset and datareader?

4 Answers   Choice Solutions,


Define the data provider classes that is supported by ado.net?

0 Answers  


What are the Different layers in ADO.Net?

7 Answers  


What is the difference between DataReader and DataSet in ADO.NET?

0 Answers   Petranics Solutions,


What is ado.net object model?

0 Answers  


Which components of a data provider is used to retrieve, insert, delete, or modify data in a data source?

0 Answers  


What is the use of SqlCommandBuilder?

0 Answers  






Categories