Frontpage DRWI’m not a huge Frontpage fan for the most part, but when it comes to creating ASP pages with database results it does do a good job. There are some things that it lacks, but overall you can get a nicely formatted report that is easily distributable through an intranet.

One of the things I had thought when working on past ASP pages is the lack of a record count. After some poking around the newsgroups (gotta love Usenet!) I found some pieces of code that I finally tweaked and experimented with enough to add a record count to an ASP page containing Frontpage Database Results.

The main piece that generates the count is this:

Now, the placement of this little bit of code is key. You need to switch to code or split view so you can past this into the actual HTML. It needs to be within the database results region. If you place it in certain places on the page, Frontpage, being the clever helper, will simply remove it. If you place it to high in the results region you will get a count but it will be off by one. The reason for this is because it’ll start with 0 as the first record. So, it really needs to be at the end of the results region.

After playing around a bit I found it works best just below the table holding the database results. I added the following:

Records: < %=fp_iCount%>