Re: Sequences Still won't work
Date: Thu, 04 Nov 1999 07:08:27 GMT
Message-ID: <38212f9d.254218587_at_news.demon.co.uk>
Hi Denny
>I am getting very frustrated here (but a lot smarter as well). I created
>a
>INSERT trigger against the a table using procedure builder. It updates
>the PK with the next sequence.
>I tested it using plain old SQL INSERT commands in SQL*Plus and it
>worked very well. Now, when
>I try to use it in the form, I get a message from Forms saying the
>record is
>already inserted. I tried creating an ON-INSERT trigger against the
>block and
>I get the same message indicating the record was already inserted. I
>have
>put the edit control on the form, I left it off the form and I have
>hidden
>it - none worked. Is there some property for this object that I am over
>looking. This must be a simple process??? Thanks for any help...
It *is* a simple process! :-)
If you have a field in Forms and set mmm I think ottomh it is the
'initial value' property to something like
:sequence.sequenceobjectname (go down to that property and hit f1 to
get syntax/usage)
then everytime a row is inserted into the database the column will be
set to the sequence value. Get rid of your on-insert and trigger.
As a quick test - create default form, with 2 fields, 1 maps to pk, 1 doesn't. Set the pk field as described. Compile and run, set the non-pk field to something non-null and commit eh voila! :-)
A Bientot
Marc
Received on Thu Nov 04 1999 - 08:08:27 CET