|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Moving to a specific row
Date: Aug 31 2000 6:25PM
ye, wei writes:
> Michael Peppler wrote:
> > The correct way to do this in a set-based envionment is to use the
> > unique primary key in the where clause to get the next X rows of a
> > request.
> >
> > So assuming you have an identity column as the primary key, you simply
> > remember the last value retrieved for the current page, and when the
> > user hits "next" you do a request where the primary key > this value.
>
> But in web page, usually the grid need to be shown sorted by different columns,
> sometimes is by the primary key, sometimes not, so where the primary key > this
> value
> doesn't work.
True. So you need to find some combination of column values that will
be unique and ordered correctly, especially if you are getting data
from a large table.
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@peppler.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com
|