Getting # of records in a table

M

mstumpo

I know how to obtain the number of records via the DRW in FP but it is a pain
to have to use the DRW to do it. Is there an easier way to code that without
using the DRW.

For example, I would like to state on a page that there are "15" users on
the system, etc.

Any help would be appreciated.
 
T

Thomas A. Rowe

See:
http://www.asp101.com/resources/active_users.asp
http://www.asptutorial.info/script/activeuserscounter/
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
P

p c

Assuming your web server is IIS.
You need a text file called global.as on the root of your web that has
certain statements.

Here's how to do it.
1. Create/edit the global.asa file with Notepad and add the following:

<script language="vbscript" runat="server">

Sub Session_OnStart()
Application.lock
Application("Users") = Application("Users") + 1
Application.unlock
End Sub

Sub Session_OnEnd()
Application.lock
Application("users") = application("Users") - 1
End Sub

</script>

2. Save it at your website root.

3. For the page you want to display the number of visitors, in HTML view
add the following line (ir your version):

There are <%=Application("Users")%> visitors on the site now!

...PC
 
J

Jens Peter Karlsen [FP-MVP]

You should of course realise that this will only be an estimate.
People may and will have left your site long before their session
ends.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
M

MikeR

What do the number of records in a table have to do with the number of users on the system?
MikeR 1st
 
Top