View Full Version : Creating A History

08-21-2005, 01:37 AM

I was wondering if anyone knows how to create a history of something. For example, a Client. I want to create a history of changes that were made to a client record. If someone changes his address or phone, etc. How do I record the changes that are made? Any ideas or suggestions would be greatly apprecieated.

08-22-2005, 03:52 AM
Well you seem to be going further than I ususally do. But you asked for any ideas and suggestions.

I often add a few record-tracking fields to the bottom of most tables. And then whenever code in a Web page adds or edits a record I have it call a function something like this:

' Set rec tracking var.
Call SetRecTrack(objRS, "Cust")

Function SetRecTrack(pobjRS, pstrTablePrefix)
' Purpose: Set rec tracking flds.

' Set var.
pobjRS(pstrTablePrefix & "EnterUserID") = Session("UserID")
pobjRS(pstrTablePrefix & "EnterUserLevel") = Session("UserLevel")
pobjRS(pstrTablePrefix & "EnterIPAddr") = Request.ServerVariables("REMOTE_ADDR")
pobjRS(pstrTablePrefix & "EnterDt") = mvarOrgCurDt
pobjRS(pstrTablePrefix & "EnterTime") = mvarOrgCurTimeExclSec
End Function