Mike, Your question has evoked answers that address 2 separate issues.
1) How are changes to data saved so an audit can identify who changed what and when? 2) How can someone have time appropriate data? For the first, the answers on audit all appear quite good. Separate tables that can be reviewed via some special UI. But this approach is only auditing, not for ongoing business. The second is much more critical. If the price of an item changes, when an invoice is printed, it needs to show the price in effect when it was printed. If I sell something today, the current price is usually appropriate. But if I re-print an invoice from last month, I need to know the price (and quite likely, other values) in effect at that time. In other words, time is just one more critical data point used to identify the correct data. The downside to the first is that, unless you re-write your code, the solution requires either triggers or stored procs - both of which require a DBA (in most work environments.) The downside to the second is that not only will it require a dba (structure changes), but it will also require work to make your queries time aware. Just a thought, Fletcher Fletcher Johnson [email protected] LinkedIn.com/in/FletcherJohnson twitter.com/fletcherJ strava.com/athletes/fletcherjohnson 408-946-0960 - work 408-781-2345 - cell -----Original Message----- From: ProFox [mailto:[email protected]] On Behalf Of MB Software Solutions, LLC Sent: Monday, April 22, 2019 12:34 PM To: [email protected] Subject: How best to do an audit trail of changes (EASILY WITHOUT THE NEED FOR A DBA) VFP9SP2 app, MariaDB 10 (MySQL) backend. One of my clients asked about a history of price changes. Easy enough to implement programmatically for the few price fields, but then I got to wondering if simply putting code in the ON UPDATE trigger to send the old record to a "history" table would be a more complete (and long term EASIER) solution, whereby my app would query the "history" table for changes. Your thoughts for tracking price (or other) changes? tia, --Mike --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

