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 is the meaning of object pooling?

887


What are the 3 major types of connection objects in ado.net?

790


What are the pre-requisites for connection pooling?

773


What is data control techniques?

716


Which control of the BindingNavigator returns the current position within the data source?

960


What is ado recordset?

717


What are datareaders?

725


Explain how to call the sql commands asynchronously in ado.net version 2.0?

747


What is ado oledb and odbc?

726


Explain executenonquery?

840


Is it possible to load multiple tables in a Dataset?

788


What are the features of ado.net?

735


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

841


Explain all the classes those are used for database connections between sql server and asp.net?

788


What are the benefits of using of ADO.NET in .NET 4.0?

779