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
How to pass values into a datatable?
What is an ado connection?
Define isolation?
Difference between sqlcommand and sqlcommandbuilder?
What is an example of ordinal data?
How to add a check box or a dropdown list to a column in a datagrid?
Which is faster ado.net or linq?
What is the full form of ado.net?
Explain the namespaces in which .net has the data functionality class.
What are the various methods provided by the DataSet object to generate XML?
Explain the differences between oledb sql server, oledbdotnet provider?
What is ole in excel?
How to check if a datareader is closed or opened? IsClosed()
How to Read, Add, Update and Delete record in Entity Framework ?
What are the several execute methods of ado.net?