Re: Oracle form builder automatic increment while inserting new row

From: <ukiEMAIL_at_gmail.com>
Date: 31 May 2006 04:56:31 -0700
Message-ID: <1149076591.238941.307920_at_i40g2000cwc.googlegroups.com>


Mark C. Stock napisal(a):
> <ukiEMAIL_at_gmail.com> wrote in message
> news:1149068629.043337.262960_at_i40g2000cwc.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.
> :
>
> don't have the time to test, but AFAIR you can use an Oracle SEQUENCE object
> (which is the prefered method for assigning PK values) as the default value
> for an item in forms (which will contribute significantly to gaps in the
> sequence)
>
> you are correct the value that you are getting is identical because no
> commit has been issued -- but the solution is probably not to force a commit
> after each row.
>
> ++ mcs

[Quoted] [Quoted] In which menu I will find Oracle SEQUENCE object, and is it available in 6i version?? Received on Wed May 31 2006 - 13:56:31 CEST

Original text of this message