Page Paging Web Data Sets? 
Author Message
 Page Paging Web Data Sets?

I am looking for a good methodology for paging result sets of data,
using a VFP7 DBC as a data source.  My current method breaks down as
the original table gets large.  This is for serving the table rows on
the web.

Currently I am doing this:

Get RecCount() of table (now 100,000 rows and growing)
Divide Int( RecCount() / iRows + 1 )to get total number of pages
If I want the first page
     Multiply total number of pages * page wanted to get bottom page
row number
     Add number of rows wanted + bottom range row to get top range row
number
     Select * from table where RecNo() between bottom and top row
number wanted

What are you guys doing?



Tue, 28 Sep 2004 04:41:30 GMT  
 Page Paging Web Data Sets?
My first question would be why you're serving up a table that size row by
row. How user friendly is it?

Does the user really need to see every row before they get to the one
they're interested in? Why not ask them something about the row (customer,
or whatever) and get everything that's close instead?

My next question would be why you're using recno(). It will only work if the
table is in physical order, and the physical order rarely matches what the
users would rather see.

Never schlep large data sets on a web app unless there is absolutely no way
around it. Find some way to qualify the query so it will present the most
likely candidates instead.

Dan


Quote:
> I am looking for a good methodology for paging result sets of data,
> using a VFP7 DBC as a data source.  My current method breaks down as
> the original table gets large.  This is for serving the table rows on
> the web.

> Currently I am doing this:

> Get RecCount() of table (now 100,000 rows and growing)
> Divide Int( RecCount() / iRows + 1 )to get total number of pages
> If I want the first page
>      Multiply total number of pages * page wanted to get bottom page
> row number
>      Add number of rows wanted + bottom range row to get top range row
> number
>      Select * from table where RecNo() between bottom and top row
> number wanted

> What are you guys doing?



Thu, 30 Sep 2004 00:45:07 GMT  
 Page Paging Web Data Sets?
Hello.
You MUST specify the alias name as the RECNO() argument. Otherwise, it will
fail, specially when several tables are involved.
In addition, you could try to INDEX ON RECNO() TAG myrecno in order to
improve speed
Carlos



Quote:
> I am looking for a good methodology for paging result sets of data,
> using a VFP7 DBC as a data source.  My current method breaks down as
> the original table gets large.  This is for serving the table rows on
> the web.

> Currently I am doing this:

> Get RecCount() of table (now 100,000 rows and growing)
> Divide Int( RecCount() / iRows + 1 )to get total number of pages
> If I want the first page
>      Multiply total number of pages * page wanted to get bottom page
> row number
>      Add number of rows wanted + bottom range row to get top range row
> number
>      Select * from table where RecNo() between bottom and top row
> number wanted

> What are you guys doing?



Thu, 30 Sep 2004 05:00:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. newbie-WEB page passing data to VFP6 DLL

2. Changing data in one page from another page

3. dB Web Builder - Generate Web Pages from xBase Databases

4. FoxPro Web Pages & FTP Sites

5. VFP and the web - search page

6. Web pages

7. FoxPro Web Pages?

8. Web Page

9. REGISTERING ACTIVEX CONTROLS ON WEB PAGES

10. REGISTERING ACTIVEX CONTROLS ON WEB PAGES

11. help with veiw as web page

12. wanted .. information on accessing web pages etc

 

 
Powered by phpBB® Forum Software