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: Philippe <parnaud_at_yahoo.com>
Date: Tue, 23 Feb 1999 12:04:23 +0100
Message-ID: <7au26q$rhr$1@concorde.ctp.com>


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 - 05:04:23 CST

Original text of this message

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