Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Returning Sequence Numbers In VB
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
![]() |
![]() |