Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Tracking users in db

Posted 02 May 2002 01:00:54
1
has voted
02 May 2002 01:00:54 Travis Brown posted:
Somebody tell me if this is ill-conceived;

I want/need to log usage on a site. It is really a onepage site. What I'm thinking is creating a global.asa file that will insert a record (SessionID, date/time, auth_user, referrer) in a table when a session starts. Then, on the asp page, create an insert command that will execute every time the page is loaded. This will insert into a child table the sessionID, page title, url w/ querystring, date/time, referring URL.

Then, on Session_OnEnd, I'd like to update the record in the primary table to add a session end time so I can do a differential annd see how long a session was.

What I need to know is, are sessionIDs unique just during concurrent sessions, or unique from for every session ever on the server. Will I ever get a duplicate sessionID?

If so, I will have to create an autonumber primary key in the DB and get the asp page to call the id where the record in the db equals the sessionID and use the record ID to insert in the child table.

I'd make the inserts a stored procedure, I think.

I haven't really worked with gobal.asa files before, save showing active users etc.


Reply to this topic