> I have a multiuser CSR application that has some audit functionality to track > certain changes to customer records (for instance change of first name or last > name, who changed it and what was it before?). It already logs these changes, > but I think it could be more efficient. I was wondering if anyone could > comment > on how they would go about doing this. Right now, it is strictly code-based. > The database is SQL Server 2000 and the server is ColdFusion 8.
Make use of triggers for INSERT/UPDATE/DELETE. For SELECT I use stored procedures that log the request and then execute it. The downside of using triggers is that there are no parameters. You can overcome this by adding a "LastChangedBy" column and using it in the trigger. That way I let the database engine do what it does best. Hatton ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292398 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

