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...

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

How to pass values into a datatable?

1179


What is an ado connection?

1035


Define isolation?

1026


Difference between sqlcommand and sqlcommandbuilder?

1190


What is an example of ordinal data?

1238


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

1016


Which is faster ado.net or linq?

1065


What is the full form of ado.net?

1036


Explain the namespaces in which .net has the data functionality class.

1155


What are the various methods provided by the DataSet object to generate XML?

1053


Explain the differences between oledb sql server, oledbdotnet provider?

1054


What is ole in excel?

984


How to check if a datareader is closed or opened? IsClosed()

1068


How to Read, Add, Update and Delete record in Entity Framework ?

1091


What are the several execute methods of ado.net?

975