Re: Sequences: How to generate outside of default property
Date: 1998/01/29
Message-ID: <34D06B64.A5C01731_at_stibo.dk>#1/1
You'll have to write
SELECT sequence name.NEXTVAL INTO :item name FROM Dual;
And refer to this snippet from your PRE-INSERT trigger on the block.
/J rn
Joanne James wrote:
> Hello... I've set up my sequence to generate up to number x (ie, 99999)
. I
> want the sequence to get the next number to store in an item only when
I
> press 'Save'. It seems I can only get the sequence to work within the
> default property of the item. I cannot assign it within code by doing
> something like: 'block.item := :sequence.scema.sequenceName.nextval'
.
> I've tried many variations on this, and can't get it to work. I tried
> setting my form so that it would go into enter-query mode, (so a new re
cord
> wouldn't automatically be created upon entering the form), but even tha
t
> doesn't seem to prevent the sequence from generating the next number.
Any
> suggestions?
Received on Thu Jan 29 1998 - 00:00:00 CET