Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Sequence.Nextval Question
Dianne Siebold wrote:
>
> 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.
If you have accessed nextval, can you not preserve that
value in a variable for use in populating the other tables?
Currval isn't appropriate.
If you haven't got access to a "front end" variable, try a package
variable - they will have persistence througout your session.
Cheers,
Terry
Received on Thu Nov 06 1997 - 00:00:00 CST
![]() |
![]() |