Re: SQL Cursors
From: Anders Altberg (x_pragma_at_telia.com)
Date: Thu, 17 Jun 2004 03:23:51 +0200
You'd save yourself a few pages of programming by displaying your cursor in
a Grid that you make five rows high.
What will the user be doing to these rows.
"kd" <firstname.lastname@example.org> wrote in message
> I want to select the first 5 records from the result set and display the
values of the fields as button texts and then on a button click(caption
"Next"), display the next 5 records and go on till all the records are
> "Eric den Doop" wrote:
> > Hello, kd!
> > You don't to open an sql result cursor because it's already opened:
> > SELECT fld1, fld2 ;
> > FROM yourtables ;
> > WHERE something = .T.
> > INTO CURSOR result
> > * loop through records
> > SCAN
> > * print fld1 and fld2 to active window
> > ? result.fld1, result.fld2
> > ENDSCAN
> > * to display all records:
> > BROWSE
> > What exactly do you mean with "display them". Do you want to display the
> > result set in a form with textboxes etc, or in a browse window? Or
> > report? Let us know if you need more help.
> > --
> > Eric den Doop
> > www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8