Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting sequence number using ADO
I should have mentioned that the VB application is a web application
and hence is taking multiple requests from browsers simultaneously and
it is all taking place in the same session. I assume I need to do some
locking or something?
"Philippe" <parnaud_at_yahoo.com> wrote:
>Hi Paul,
>
>you can get the last sequence number like this : SELECT YourSequence.CURRVAL
>FROM DUAL
>
>you don't have to lock the table, CURRVAL is the last sequence number for
>the current session.
>
>HTH,
>Philippe
>
>Paul wrote in message <36d26a78.97038_at_news.dial.pipex.com>...
>>I am writing a VB program using ADO to access an Oracle database.
>>Primary keys are generated using sequences. When a row is inserted I
>>want to find the sequence number just generated. Is the best approach
>>to this to lock the table before doing the insert, get the sequence
>>number and then release the lock? If so how do I do this with ADO?
>>Thanks in advance.
>
Received on Tue Feb 23 1999 - 07:53:11 CST
![]() |
![]() |