esteiner
Programmer
- Oct 31, 2003
- 24
Hello,
I have data in an Access table that I would like to export to multiple HTML tables. I would like to split the data in the Access table (about 92,000 records) into multiple HTML tables/files to reduce download time and bandwidth usage on my web server. That way, the user can select a particular page to download instead of downloading a page with all of the records.
I would like to set a limit of only 500 records per file.
For example, I would like to be able to read from an Access Query, 'qryA'. This query selects all records whose part number starts with "A".
The pseudo-code for the routine that I would like to run is as follows:
// Variables
RecordCount = 1
PageCount = 1
Buffer = some kind of temp space
Outfile = qryA-(PageCount).shtml
// (The filename for the first pass would be qryA-1.shtml)
Read all records from qryA into Buffer
while not EOF (Buffer)
{
----->write to Outfile "<table>"
-----> while RecordCount <= 500 {
-------->read next line from 'Buffer'
-------->write to Outfile "<tr><td>Buffer.fieldA</td></tr>"
-------->write to Outfile "<br>"
-------->RecordCount = RecordCount + 1
--------> }
------> write to Outfile "</table>"
------> Close Outfile
------> RecordCount = 1
------> PageCount = PageCount + 1
}
This seems to be a fairly simple alorithm, but I have not coded in quite some time. Can anyone suggest a language that would be best (and fairly simple) to implement this idea? I am running Windows 98 if that is important.
Thank you very much in advance.
I have data in an Access table that I would like to export to multiple HTML tables. I would like to split the data in the Access table (about 92,000 records) into multiple HTML tables/files to reduce download time and bandwidth usage on my web server. That way, the user can select a particular page to download instead of downloading a page with all of the records.
I would like to set a limit of only 500 records per file.
For example, I would like to be able to read from an Access Query, 'qryA'. This query selects all records whose part number starts with "A".
The pseudo-code for the routine that I would like to run is as follows:
// Variables
RecordCount = 1
PageCount = 1
Buffer = some kind of temp space
Outfile = qryA-(PageCount).shtml
// (The filename for the first pass would be qryA-1.shtml)
Read all records from qryA into Buffer
while not EOF (Buffer)
{
----->write to Outfile "<table>"
-----> while RecordCount <= 500 {
-------->read next line from 'Buffer'
-------->write to Outfile "<tr><td>Buffer.fieldA</td></tr>"
-------->write to Outfile "<br>"
-------->RecordCount = RecordCount + 1
--------> }
------> write to Outfile "</table>"
------> Close Outfile
------> RecordCount = 1
------> PageCount = PageCount + 1
}
This seems to be a fairly simple alorithm, but I have not coded in quite some time. Can anyone suggest a language that would be best (and fairly simple) to implement this idea? I am running Windows 98 if that is important.
Thank you very much in advance.