Jason Harris wrote:
> Jon,
>
> Try this on the insert trigger:
>
> for each row (
> execute procedure get_time() into table.column)>
I don't think this will work, either. Unless behavior has changed (and it may
have), you can't alter any of the columns of the row to be inserted in an insert
trigger. However, this particular problem is easily solved, if you are PREPARING
the insert statement. You have something like "INSERT INTO table (column,
column, ...) VALUES (?,?,...)". Just substitute the "?" placeholders for the
time and user columns to CURRENT and USER.
> On Fri, 6 Feb 1998 13:54:45 -0000, "Jon Brown" <jbrown@deverill.co.uk>
> wrote:
>
> >Can anyone offer advice?
> >
> >We are developing a large client server system with an Informix back end.
> >Each of the tables in the database has a lastupdated and bywhom field which
> >we had invisioned setting by use of an 'after Insert/Update' Trigger.
> > (i.e.)
> >CREATE TRIGGER post_insert> >INSERT ON tablename
> >REFERENCING NEW AS NEW_INS
> >FOR EACH ROW ( NEW_INS.lastupdated = CURRENT;
> > NEW_INS.bywhom = USER);
> >
> >
> >It would appear that it is impossible to update an informix table with a
> >trigger that is on the same table
--
//////////////// =======================================================
////////// // Dennis J. Pimple Informix Software, Inc.
////// / /// Principal Consultant 6300 S Syracuse Way Ste 205
///// // //// dennisp@informix.com Englewood CO 80111
//// // /////
/// // ////// recept: 303-850-0210
// // /////// direct: 303-740-5611 Opinions expressed are mine,
/ /////////// fax: 303-779-4025 and do not necessarily
//////////////// http://www.informix.com reflect those of my employer