I don't think this is possible without using persistence of some sort. We have a package we use that generates XML files for paging through results. There is a background job that runs periodically to delete the old files.
Matt
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Bradley V. Stone
Sent: Thursday, July 30, 2009 11:31 AM
To: WEB400@xxxxxxxxxxxx
Subject: [WEB400] SQL Cursor Positioning with Web Application
For years I've written Web Applications using dynamic SQL to build result
sets.
For example, if a user wants to search a transaction history, I give them
a bunch of fields that they can use to select records, and also options to
sort by any of the columns. Pretty simple when using dynamic SQL.
For paging I store the RRN of the result set so when they click "previous"
or "next" I use relative positioning with my SQL. Works great.
Now in this particular case where we're querying a transaction file it
gets updated very often. Lets say a few records every minute. So lets
say they view page one, click next so they're on page 2. Then next so
they're on page 3. During this time, 10 new records were added. So they
go back which should be page 2, but it's really (for lack of a better
term) page 2.5 since more records have been added. :) So it loses the
positioning.
So, without using persistance, temp files, etc.. anyone have any ideas
here? Or is this a case where "that's just how it will work".
Thanks!
--
Bradley V. Stone
BVSTools, Inc.
[1]www.BVSTools.com
[2]www.eRPGSDK.com
References
Visible links
1.
http://www.bvstools.com/
2.
http://www.erpgsdk.com/
As an Amazon Associate we earn from qualifying purchases.