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
What are the parameters that control most of connection pooling behaviours?
How to load multiple tables into a dataset?
How to bind the controls(best practice) comboboxes to the data in the dataset?
What is ambient transaction?
What property must be set and what method must be called in your code to bind the data from some data source to the Repeater control?
Explain how do you connect to sql server database without using sqlclient?
Describe the disconnected architecture of ADO.NET’s data access model.
how you will deal result set? How do you sort a dataset?If a dataset contains 100 rows, how to fetch rows between 5 and 15 only?
What is a string variable?
What are the ado.net objects?
How to check if a datareader is closed or opened? IsClosed()
Is it possible to edit data in Repeater control?
What is difference in record set and dataset?
Describe connection object in ado.net
What is the difference between typed and untyped dataset?