Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Returning Sequence Numbers In VB

Re: Returning Sequence Numbers In VB

From: Eric Fortin <emfortin_at_earthlink.net>
Date: Tue, 09 Jan 2001 14:17:17 GMT
Message-ID: <N3F66.10742$MX.398485@newsread1.prod.itd.earthlink.net>

Do you know the sequence name?

if so, you should:

select [sequence_name].nextval from sys.dual set rs = conn.execute...

id = rs([sequence_name])

once the nextval is established during your session, you can get the current value of the sequence:

select [sequence_name].currval from sys.dual

Note: you may need to create a public synonym for the sequence if it has not already been granted to you.

once you've established the nextval in your "Ben Ralph" <ben_at_ralph.demon.co.uk> wrote in message news:978982105.18343.0.nnrp-10.c2de4ac6_at_news.demon.co.uk...
> When writing a new record to an Oracle table how can I have the sequence
> number returned to my VB app.
>
> --
> Ben Ralph
> MCP
>
>
Received on Tue Jan 09 2001 - 08:17:17 CST

Original text of this message

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