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 is sqldatareader?
Explain executenonquery?
What is Serialization in .NET? what are the types of Serialization?
How to identify the updated rows in a dataset?
Is it possible to load multiple tables in a Dataset?
What is the difference between typed and untyped dataset?
What is the advantage of ado.net?
How to creating a SqlCommand Object?
How to pass multiple tables in datasets simultaneously?
What are the different ado.net namespaces?
Define ado.net?
Give an example that shows how to execute a stored procedure in ado.net?
What is sql command in ado net?
What are all the different methods under sqlcommand?
Can we do database operations without using any of the ado.net objects?