Re: Oracle form builder automatic increment while inserting new row
Date: 31 May 2006 07:43:35 -0700
Message-ID: <1149086615.863325.195590_at_c74g2000cwc.googlegroups.com>
Mark C. Stock napisal(a):
> "Cris Carampa" <cris119_at_operamail.com> wrote in message
> news:447d8c2e$0$1008$5fc30a8_at_news.tiscali.it...
> ukiEMAIL_at_gmail.com wrote:
>
> > In which menu I will find Oracle SEQUENCE object, and is it available
> > in 6i version??
>
> In 9i you just have to write ":sequence.<sequence-name>.nextval" in the
> "Initial Value" property of the item.
>
> In 6i... I don't know.
>
> Kind regards,
>
> --
> Cris Carampa (spamto:cris119_at_operamail.com)
>
> potevo chiedere come si chiama il vostro cane
> il mio è un po' di tempo che si chiama Libero
>
> addtionally, the SEQUENCE object needs to be created in the database (it's a
> database object, like tables and views, not a client-side object, like
> blocks and items)
>
> ++ mcs
Thanks to all I figure out how to solve the problem. Here's the
solution.
We create sequence in databese for example Create sequence my_seq start
with 1 increment by 1;
And in Oracle Form Builder (I have 6i) we create trigger KEY_CREREC
and in editor we type in:
CREATE_RECORD;
select my_seq.nextval into :MYBASE.id from dual;
and now when we launch form and we press Insert new record (The one with green 'plus' sign) new record is created and id field is filled with nextval of our sequence Received on Wed May 31 2006 - 16:43:35 CEST