This topic is locked

Log old data into a table with session userid

8/1/2007 3:19:13 PM
ASPRunnerPro General questions
Z
zc2ndbass author

I was trying to log deleted records and who deleted it a table.
[codebox]'** Save old data record in another table ****

strSQLSave = "insert into Log (username, logindatetime) SELECT '" & Session("UserID") & "', now() FROM " & strTableName & " where " & where

dbConnection.Execute strSQLSave
BeforeDelete = True[/codebox]
I have tryed this code and it doesn't work.
Need some help! Thanks

Sergey Kornilov admin 8/1/2007

What exactly you trying to save in the Log table?

Z
zc2ndbass author 8/2/2007

What exactly you trying to save in the Log table?


I was trying to save the current user that is logged on to the website. And save the current time in the Log table when a file is deleted.

Sergey Kornilov admin 8/2/2007
strSQLSave = "insert into Log (username, logindatetime) values('" & Session("UserID") & "', now())"

dbConnection.Execute strSQLSave
BeforeDelete = True