On 1/16/07, Teddy Payne <[EMAIL PROTECTED]> wrote:
> For 1, 2 and 3, you will typically enter records into the database during
> the login process and the logout process that you create.
>
> You will need to put something in onSessionEnd for when sessions expire just
> in case they don't use your logout portion of the code.
>
> As for the data changes, I would recommend letting the DB handle this for
> you.  Most modern databases have triggers.  Use triggers to copy the record
> that was changed or edited into a duplicate log table or log database.

Seconded. If you do a little searching on audit and trigger for your
particular database, you should find some examples to help automate
the process.

As an aside, you need to be pretty careful if you *already* use a lot
of triggers in the app. And of course you need to link the user to the
data that changed, but you might be able to make that easier by adding
a lastUserId or something to each audited table so when the trigger
copies it, the data is already there about the user that goes with the
data.

One more aside, paging through the data in a meaningful way is a pain
-- but a simple history table (recent first) handles the basics for
tracking changes.


-- 
John Paul Ashenfelter
CTO/Transitionpoint
(blog) http://www.ashenfelter.com
(email) [EMAIL PROTECTED]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266684
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to