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
Explain how to call the sql commands asynchronously in ado.net version 2.0?
What are the ado.net objects?
How can I retrieve two tables of data at a time by using data reader?
What are the advantages of using datalist?
How to pass values into a datatable?
Which is faster sqldataadapter and sqldatareader?
What is partial class?
Which one of the objects is a high-level abstraction of the connection and command objects in ado.net?
What is the difference between data grid and data repeater?
What are good ado.net object to replace to ado recordset object.
Can datareader hold data from multiple tables?
Explain the difference between data reader and data set?
What is the significance of CommandBehavior.CloseConnection ?
Which is faster entity framework or ado.net?
Describe briefly an ADO.NET Dataset ?