Don Oldenburg
|
| Posted: 07/31/2001, 9:35 AM |
|
Okay, I've added the online status field from the CC Faq file and that is
working nicely. However, I wanted to take it a bit further and post a
transaction into another tracking database to keep track of logins and
logoffs. Here is my "onLogin" event
if bPassed then
sql = "update cacmEmployee set IS_online='YES' where EmployeeID=" &
ToSQL(DLookUp("cacmEmployee", "EmployeeID", "UserName =" & ToSQL(sLogin,
"Text") & " and Password=" & ToSQL(sPassword, "Text")),"Number")
cn.execute sql
sql = "insert into cacmemptracking (employeeid, historytype, historycomment)
value (" &ToSQL(DLookUp("cacmEmployee", "EmployeeID", "UserName =" &
ToSQL(sLogin, "Text")), 100, "User Successful Login")
cn.execute sql
end if
The last sql command does not work. I have a table setup as follows
cacmemptracking
RecordID (auto increment)
EmployeeID (int) Should be the user_id number of the user
logging in
HistoryType (int) currently 100=log on, 105=log off
HistoryStamp (datetime) time stamp of when this took place
HistoryComment (char) "User Successful Login"
Any ideas? I'm learning by leaps and bounds, but I'm missing something very
trivial I believe.
Don
|
|
|
 |
|