Search Tools Links Login

Publish recordset(s) 2 HTML using template(s)

A new version is now available as part of a commercial product. See
With this code it is very easy to publish database information as HTML. Customizing such a publication is very easy because of the use of templates. This is the second version of this code. All the votes for the previous version inspired me to make some big improvements. Thanks for the votes! :-) The screenshot below and the demo project will show you most of the possibilities of this code.
New features are:
. Converted the module to a class module.
. Added 3 events for next record, next page and error.
. It is now possible to include other templates. (subforms!)
. . These templates can have their own recordset. (don't have to)
. . A 'subform' can be bound to the mainform by linking a field from the main recordset to a field in the sub recordset. (don't have to)
. . You can include multiple templates and these templates can also include multiple templates. So you can create a sub of a sub.
. I added a couple of system parameters that can be used in the templates (record number, line number inside a group, even/odd line, greenbar) You can use this to give every other line a different colour.
. You can put in ' as the page grouping and you will get one big HTML file with all the data.
Features that already existed:
. You can put all fields from the recordset anywhere in the template. (even within HTML tags)
. You can create multiple (nested) grouping levels. Each level will have its own header, footer and detail section.
. There are a lot of system parameters and it is easy to add you own. Almost all App properties can be used.
This code can be useful:
. When you are not able to access your database dynamically from your web server. You can use this to publish database information.
. When you need an easy to use and customizable data reporting tool.
. When the number of data updates is much lower than the web traffic you have. In this case static WebPages will probably give a much smaller server load.
. If you created your own web server in VB. You can use this to give it functionality to access a database
. When ...?

Original Author: Edwin Vermeer

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 94 times


Visual Basic 6


Posted: 9/3/2020 3:45:00 PM
Size: 151,739 bytes

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.