× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Rick.Chevalier@xxxxxxxxxxxxxxx wrote:
I am defining some new tables using DDL and would like to have
the database automatically update the user ID and timestamp audit
fields whenever a row changes without having to code the update
into each program that uses the table.

I found an April 1, 2009 article by Michael Sansoterra that
tells how to do it using new 6.1 features. Unfortunately we are
at 5.4. Is there a way at 5.4 to have the database automatically
update the audit fields when a row changes?


Why not just use SQL CURRENT TIMESTAMP in the SQL DML. Not using SQL DML for the DDL objects, or just prefer to avoid the CURRENT TIMESTAMP? Update & Insert via a VIEW which excludes the TIMESTAMP column; define the TIMESTAMP column with DEFAULT CURRENT TIMESTAMP. If non-SQL RPG, presumably perform according to what is described in the very recent thread on RPG400-L subject: PF Default values

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.