environment var in trigger
Posted in 1995
I'm trying to create a simple audit trail trigger. On update of a cost field, I'm going to to insert into an audit table the pre & post values of the cost, the item code, warehouse code, some other fields that are in the same table, and the user & current (date/time). What I'd also really like to get in the table is what program caused the trigger to occur. The program id is an environment variable, but I can't figure out from the docs or tech support how to get a trigger or stored proc to read an environment variable as a value into a table. Or, another idea I had was using a 4gl function to get the environment variable. But again, the docs and tech support are no help in getting a trigger or stored proc to call a 4gl function. Any ideas would be very much appreciated. Please email to slivi@interaccess.com Thanks.