Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Cursors and overhead!!!!!!!!!!!!!!!!!!!111
Date: Aug 31 1999 3:01PM
Steven Cruz writes:
> "BAHRI, SOFIENNE" wrote:
> > Hi folks,
> > I'm using sybperl to connect to a sybase database. The user fill a form
> > and then subit the query to the cgi. the problem i have is that i get so
> > much rows(about 1000) and the browser stay a long time to display the
> > rows. what i would like to do is to have a buttom (Next)on my page of
> > results and each time the user press next he gets for example the 10
> > other records displayed in browser.
> > Any Help will be Appreciated
> The problem is with CGI that their is no idea of a session. :( thus you
> may have to run your query several times. What I have done is used
> CS_OPT_ROWCOUNT option to only return 10 the first time, 20 the next
> time. You just need to keep track of page size and page count.
> You could also take all your results dump it into a temp file and read
> from that. It would save repeated database hits.
But you'd have to seek the temp file instead, which may or may not be
faster depending on the size of the temp file...
> Steven Cruzbegin:vcard
> tel;home:416-516-4652 (work 2)
> org:Nextopia Software
> title:Depends on what day
> adr;quoted-printable:;;Current=0D=0Anextopia software corporation=0D=0A142 adelaide street east, 3rd floor=0D=0Atoronto, ontario=0D=0Am5c 1k9=0D=0A=0D=0ALong Term-=0D=0A116 lansdowne Ave Unit 3=0D=0AToronto ONT=0D=0AM6K 2C9=0D=0A;Toronto;Ontario;M6K 2C9;Canada
> fn:'steven cruz'
Michael Peppler -||- Data Migrations Inc.
firstname.lastname@example.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: email@example.com