Re: SQL*FORM Trigger QuestionIn article <6830.2b8c83e4_at_hayes.com>,

From: Ted Dinh <ted_at_marley.aws.waii.com>
Date: 26 Feb 93 21:04:01 GMT
Message-ID: <1925_at_airgun.wg.waii.com>


fgreene_at_hayes.com writes:
|> In article <1993Feb15.214934.5660_at_memstvx1.memst.edu>, wliu_at_memstvx1.memst.edu writes:
|> > Dear Netter,
|> >
|> > To update a table ( called table2) outside of current form, I
|> > wrote a KEY-NEXTFLD trigger(current block: table1):
|> >
|> > update table2
|> > set f2 = :table1.f2
|> > where f1 = :table1.f1
|> > commit;
|> >
|> > But it never worked. Would you please tell me why and what is the
|> > solution?
|> >
|> > Thank You In Advance.
|> >
|> > Bill
|> >
|> You left the semicolon off the the end of the update statement. Since you
|> are operating within SQLForms, use COMMIT_FORM rather than COMMIT.
|>
|> Frank Greene

I do not think that is the problem though. I believe that you can only update/ insert/delete a non-target table within a form in one of the Post-Update, Post-  or Post-Delete Triggers.
If you do not want to do that, then you can create an SQL script outside of the form and use macro "host" to execute that SQL script to do the update.

Good luck. Received on Fri Feb 26 1993 - 22:04:01 CET

Original text of this message