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: Getting sequence number using ADO

Re: Getting sequence number using ADO

From: Paul <technotic_at_dial.pipex.com>
Date: Tue, 23 Feb 1999 13:53:11 GMT
Message-ID: <36d3b282.311190@news.dial.pipex.com>


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

Original text of this message

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