How does u get record no from 5 to 15 from a dataset of 100 records?

Showing Answers 1 - 3 of 3 Answers

Naveen

  • Mar 29th, 2007
 

the code is


SqlConnection con1=new SqlConnection (ConfigurationSettings.AppSettings["cons"]);SqlCommand cmd=new SqlCommand("student",con1);
SqlDataAdapter db=new SqlDataAdapter();

db.SelectCommand=cmd;

cmd.CommandType=CommandType.StoredProcedure;

DataSet ds = new DataSet();

db.Fill(ds,5,15,"student");

DataGrid1.DataSource=ds;

DataGrid1.DataBind();



this will return the 15 rows of the resultset.
In the above code " student" is the name of the storedprocedure.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions