If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > How can I "log" when a user loads an ASP?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-23-04, 10:42
marp marp is offline
Registered User
 
Join Date: Jan 2004
Location: Romania - Bucharest
Posts: 50
How can I "log" when a user loads an ASP?

Hello

I have a sql server 2000 database, accessed via some data access pages developed using Access 2000. I would like to be able to "log" which user and when loaded the said pages, that is to be able to perform a triger-like action such as:

Insert into logtable (Page_accessed, User, time)
select 'Mypagename', current_user, getdate()

What changes should I make to my data access page?

THX

Marp
Reply With Quote
  #2 (permalink)  
Old 02-03-04, 04:18
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
Quote:
Insert into logtable (Page_accessed, User, time)
Yes, write the code to insert the information into the database (perhaps the username is stored in a session variable, etc.). And perhaps put this code in a function in an included file. And of course call the function at the top of each page:

' Pg entry log.
Call PgEntryLog()
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On