Re: Sequences: How to generate outside of default property

From: Lothar Armbruester <lothar.armbruester_at_rheingau.netsurf.de>
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;

I don't know if this solves your problem (you are talking about forms, possibly Oracle Forms(?) which I have not any experience with.)

Hpoe that helps,
Lothar

--
Lothar Armbrüster       | lothar.armbruester_at_rheingau.netsurf.de
Schulstr. 12            | lothar.armbruester_at_t-online.de
D-65375 Oestrich-Winkel |
Received on Mon Jan 26 1998 - 00:00:00 CET

Original text of this message