If a dataset contains 100 rows, how to fetch rows between 10
and 20 only ?

Answer Posted / muthu kumar

DataSet ds = new DataSet();
ds.Load(cmd.ExecuteReader(),
LoadOption.OverwriteChanges, "sample");

DataRow[] dr = ds.Tables[0].Select("id>1 and id<10");

for (int i = 0; i < dr.Length; i++)
{
Response.Write(dr[i][0].ToString()+"<br>");


}

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the drawbacks of using ado.net?

731


What is the role of the dataset object in ado.net?

810


What are all components of ADO.Net data provider?

813


What is ado circle?

893


Is ado.net an orm?

728


Explain how to bind the controls(best practice) comboboxes to the data in the dataset?

781


How do you update a dataset in ado.net?

775


Describe the command object and its method.

760


Define table relations?

749


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

902


What is basic use of data view?

740


What is executequery?

699


Do we use stored procedure in ADO.Net?

770


What is a control toolbox?

710


How do I delete a row from a DataTable?

800