Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

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
 > Hello;
 > 	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...


 > 8-)
 > Steven Cruzbegin:vcard 
 > n:cruz';'steven
 > tel;home:416-516-4652  (work 2)
 > tel;work:416-364-9557-107
 > x-mozilla-html:TRUE
 > org:Nextopia Software
 > version:2.1
 > email;
 > title:Depends on what day
 > note:8-)
 > 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
 > x-mozilla-cpt:;96
 > fn:'steven cruz'
 > end:vcard

Michael Peppler         -||-  Data Migrations Inc.    -||-
Int. Sybase User Group  -||-
Sybase on Linux mailing list: