Nope, Pre_Insert trigger dosen't work...

From: Richard Hollingsworth <william.hollingsworth_at_hsv.boeing.com>
Date: Tue, 3 Oct 2000 20:51:22 GMT
Message-ID: <39DA46CA.7DA8B0BA_at_hsv.boeing.com>


[Quoted] I tried placing the command on a Pre_Insert trigger for the block, but no good. The field on the form does NOT show the sequence number.

Thanks,
Richard

Stefan Kursawe wrote:

> Hi Richard,
>
> have your tried the PRE_INSERT Trigger ?
>
> SELECT <SEQUENCE_NAME>.NEXTVAL INTO :<DATABLOCK>.<ID_COLUMN>;
>
> HTH
> Stefan
>
> "Richard Hollingsworth" <william.hollingsworth_at_hsv.boeing.com> wrote in
> message news:39D9FC2B.8EAF6817_at_hsv.boeing.com...
> > Hi. Thanks for reading this.
> >
> > I have a sequence defined, and want it to increment by 1 each time I add
> > a new record. Well, what happens is, when the form comes up, no records
> > are visible. I have to manually press the 'execute_querry' button to
> > get the old records to show up. When I do that, the records appear, but
> > the sequence number has now doubled. Also, each time I press the "next"
> > or "previous" record button to review the old records, the sequence
> > increments.
> >
> > So I think I have the "select cr_seq.nextval into
> > :change_request.cr_number from dual;" statement on the wrong trigger.
> > Which one should it be on? I have it on the "WHEN-NEW-RECORD-INSTANCE"
> > trigger for the block. I also tried the "WHEN-NEW-BLOCK-INSTANCE"
> > TRIGGER. Same results.
> >
> > Also, where does the "EXECUTE_QUERRY" command go so it will auto. load
> > the old records for the table when the form appears?
> >
> > Thanks,
> > Richard Hollingsworth
> >
> >
> >
Received on Tue Oct 03 2000 - 22:51:22 CEST

Original text of this message