Re: Sequences: How to generate outside of default property
Date: 1998/01/26
Message-ID: <1134.330T936T12883191_at_rheingau.netsurf.de>#1/1
On 24-Jan-98 22:55:44 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 record
>wouldn't automatically be created upon entering the form), but even that
>doesn't seem to prevent the sequence from generating the next number. Any
>suggestions?
In PL/SQL you could do something like
select your_seq.nextval into your_variable from dual;