Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Oracle form builder automatic increment while inserting new row

Oracle form builder automatic increment while inserting new row

From: <ukiEMAIL_at_gmail.com>
Date: 31 May 2006 02:41:36 -0700
Message-ID: <1149068496.716085.179710@f6g2000cwb.googlegroups.com>


Hi I create block of data using table mybase (it's structure is id NUMBER PK, name VARCHAR2(20)).
I want to achieve effect that if I lanch the form and I will press insert new record the new record will have in Id cell the highest next possible value (typed automatically by the program).

I make WHEN-CREATE-TRIGGER with structure: Select max(id)+1 into :MYBASE.ID from MYBASE;

which works only for one insertion. When I press insert new record one more time it will still have the old max(id)+1 value. I think it's because the commit isn't executed when pressing insert new record.

So my problem is how to force system to commit change after each insertion or how to achieve the same result in other way. Received on Wed May 31 2006 - 04:41:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US