Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Apr 2005
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Creating A History

    Hello,

    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.

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    478
    Thanks
    0
    Thanked 2 Times in 2 Posts
    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
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •