This topic is locked

Edit/Add Tracking

5/14/2007 6:48:30 PM
ASPRunnerPro General questions
T
tretcg author

Hello,
I have fields called UpdatedAt and UpdatedBy in an Access DB. I would like to make these fields read-only and to have them automatically updated with the date\time and username of the person who makes changes to the record (UpdatedAt = date\time and UpdatedBy = username).
I found a forum topic that accomplished the username requirement through use of PHPRunner, but I'm using ASPRunner and wanted to add the username and date/time to the the table (and record) where the change are being made.
Please be advised I'm new to ASP and the product (which is GREAT btw!).

J
Jane 5/15/2007

Hi,
you can do it using Before record updated event on the Events tab.

Here is a sample code:

dict("UpdatedAt") = Now()

dict("UpdatedBy") = Session("UserID")

T
tretcg author 5/15/2007

Hi,

you can do it using Before record updated event on the Events tab.

Here is a sample code:


It works great...Thanks!

A
agmoraojr 4/18/2008

hello jane,
The result shows only the username and date/time, what I want to display is WHO Added/Edited the record by a specific date&time?
Example

UpdatedBy --------UpdatedAt -------- Record Edited

jane ------- May 16 2007, 01:11 AM -------- CustName
Thank you very much.



It works great...Thanks!

Sergey Kornilov admin 4/18/2008

jong,
you'll need to create a separate history table for this purpose and insert a new record the every time main table is updated.

N
nickrix 4/21/2008

can you give an example of how to write this info to another table lets say its called updates
do you need to change this part >> dict(" ???

jong,

you'll need to create a separate history table for this purpose and insert a new record the every time main table is updated.

J
Jane 4/22/2008

Hi,
use Insert a record into another table action as a sample.