Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


If i have 1000 records in dataset, how to do paging?

Answers were Sorted based on User's Feedback



If i have 1000 records in dataset, how to do paging?..

Answer / arunbhararthi

you can use dataadapter fill method to implement paging in
dataset.

following is the syntax:

Public Overloads Function Fill(ByVal dataSet As DataSet,
ByVal startRecord As Integer, ByVal maxRecords As Integer,
ByVal srcTable As String) As Integer

WHERE dataSet is a DataSet to fill with records and, if
necessary, schema, startRecord is the zero-based record
number to start with, maxRecords is the maximum number of
records to retrieve, and srcTable is the name of the source
table to use for table mapping.which returns a DataSet
filled with the records based on the page size passed in the
method

for example:

da.fill(ds,0,100,"emp")

Is This Answer Correct ?    14 Yes 1 No

If i have 1000 records in dataset, how to do paging?..

Answer / sunil kumar singh

for(int i=0;i<ds.Count;i++)
{
arraylist arr=new arraylist();
string abc;
abc=ds.Tables["tablename"].Rows[0][i].ToString();
arr.Add(abc);
}

Is This Answer Correct ?    4 Yes 9 No

Post New Answer

More ASP.NET Interview Questions

What are session and cookies?

0 Answers  


What is the difference between stored procedure vs function?

0 Answers  


Can action method static?

0 Answers  


How do you use viewstate?

0 Answers  


Which namespace is used by ado.net?

0 Answers  


what is view stat how it is use ?

2 Answers   Amazon,


What is session management in web application?

0 Answers  


Where do we store our connection string in asp.net application?

0 Answers  


Define a multilingual website?

0 Answers  


What is base class of button control in .net?

0 Answers  


Below is a code extract from an ASP.Net application. The code basically reads data from the “name” field in the “members” table and prints them onto the webpage. Using the assumptions provided, fill in the 4 blanks below so that the code will run correctly. ‘Assumptions: ‘conn_str is a variable that holds the connection string to the database ‘Objects dbcomm and dbread are already declared earlier dbcomm = New OleDbCommand("SELECT name FROM members", conn_str) dbread = dbcomm._______________ _____________________ response.write(_______________) _____________________ dbread.Close()

4 Answers   Techno Solutions,


What are different methods of session maintenance in asp.net?

0 Answers  


Categories