Hello,
A while ago, I originally started this thread(671). I responded to know if I could not only add the username and time that the use logged in, but add the database that they accessed. You replied with that you needed more info for this.
I have four databases - case, green, hillman, and ocqueoc
That is the name of the databases and the directory they are in.
Also, I have a field in my Users database (tables are Users and logins) fields in the logins tables are username, loggedin, and database.
I don't need anything specific, but just able to differentiate between case, green, etc. So if I can just put a filename such as (case_list.asp) in that field, that would be fine.
Each seperate database is launched from a seperate database link. So the link for case, directs them to //asp/case/case_login.asp
Within the case_login.asp it refers to the //asp/users/db/users.mdb file for user information where logins are recorded, new users are entered and validated.
After thinking about this....I figured the current code may help.
Below is the current codeing that I am using to put the username and logged in time for the user. It works Great!!!! Thanks for that advice.
Further, I would think the first part would be simple to modify....just add "database" to the (username, loggedin, database)
It's the second part that gets me....I see the session UserID, and the Now for the time....but I would need to add on the end some file name (like I was suggesting in my previous post). HELP! Thanks.
strSQL = "insert into logins (Username, LoggedIn) values ('" & Session("UserID") & "', Now())"
dbConnection.Execute strSQL