Re: Sequences on Forms

From: Frans Hovenkamp <Dieze_at_popin.nl>
Date: Tue, 2 Nov 1999 12:32:24 +0100
Message-ID: <7vmea8$pkf$1_at_porthos.nl.uu.net>


wozi heeft geschreven in bericht ...
>Two options:
>
>1. You can create an INSERT trigger which populate the primary key
> column using the sequence.
>2. Or you can wait until users complete processing and about to click a
>button to commit_form, then you can call a function which uses the
sequence
>to assign a value to the text item. Example below:
>:my_block.text_item := get_sequence_id;
>
>FUNCTION Get_Sequence_id RETURN number IS
> seq_id number;
>BEGIN
> select seq_name.nextval into sed_id from dual;
> return seq_id;
>END;
>

Third Option: Put this function in a Pre-Insert Trigger

Frans Hovenkamp Received on Tue Nov 02 1999 - 12:32:24 CET

Original text of this message