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 -> Re: Sequence.Nextval Question

Re: Sequence.Nextval Question

From: Robert Edgar <robedgar_at_hkstar.com>
Date: 1997/11/07
Message-ID: <63v2of$4ro1@news.hk.linkage.net>#1/1

 My understanding is that CURRVAL is on a per session basis ie if you call NextVal then that value will remain as you CURRVAL for this session until you again access NextVal ie it doesnt not change based on other users .... however when you call NextVal again it will not be one greater than CURRVAL exactly because other users have accessed the sequence.....

Rob

Dianne Siebold wrote in article <01bceb07$19351960$7593d4cc_at_patch>...

>We are using Oracle 7.3 and VB 5.0 for a C/S application. Within the
>database, we have created sequences to use when adding new records to the
>table. The problem is, when a record is added to a table and the
>SEQUENCE.NEXTVAL is used, how can that value be returned to the front end
>in order to add records to other tables with that value.
>
>It was suggested that SEQUENCE.CURRVAL will return the current value, but
>with 50+ users adding records to the table, it seems possible that between
>the NEXTVAL and CURRVAL, a user could add another record and the CURRVAL
>returned would be incorrect.
>
>Please let me know if you have run into this problem and how it can be
>resolved. TIA for any assistance.
>
Received on Fri Nov 07 1997 - 00:00:00 CST

Original text of this message

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