getRows method

Results 1 to 3 of 3

Thread: getRows method

  1. #1
    Join Date
    Dec 1969

    Default getRows method

    I know how to work the getRows method to grab all the results of a query. But what if I only want to display 25 results per page? it seems like a waste to go and get the whole recordset everytime. Isn&#039t there a way to grab x amount of records, starting from y location? I thought I had seen it somewhere as:<BR><BR>objRec.getRows(x,y)<BR><BR>I tried this, but had no luck. Any ideas?<BR><BR>objRec.getRows(perPage, recordNum)<BR>The application is using a value of the wrong type for the current operation

  2. #2
    C.W. Guest

    Default RE: getRows method

    You can use .GetRows(25) to return 25 rows, but you cant use it as an offset to indicate the Next 25 rows. I know we do this as a stored proc in SQL 7. But I believe even that SP cycles through the whole dataset everytime, it just has optimization. Dont know the code for it off hand though, maybe if you post in the Database forum someone could give it to you.

  3. #3
    Join Date
    Dec 1969

    Default RE: getRows method

    Yup, here&#039s how...<BR><BR>array = recordset.GetRows( Rows, Start, Fields )<BR><BR>Rows Optional. A Long expression indicating the number of records to retrieve. Default is adGetRowsRest (-1).<BR><BR>Start Optional. A String or Variant that evaluates to the bookmark for the record from which the GetRows operation should begin. You can also use one of the following BookmarkEnum values.<BR><BR>Constant Description <BR>adBookmarkCurrent Start at the current record. <BR>adBookmarkFirst Start at the first record. <BR>adBookmarkLast Start at the last record. <BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts