Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: one problem with sequence currval?
Hi
I dont know anything about the Java interface, But it could be that in your Java you are not getting the nextval from the sequence firts before selecting the currval. You cannot, i think get the currval until you have called nextval.
Hop this helps
cheers
Pete Finnigan
wwww.pentest-limited.com
In article <b1a93c73.0108130024.5797eb0d_at_posting.google.com>, Leader
<sohelcsc_at_yahoo.com> writes
>hi all,
> i am facing a problem with sequence currval , that is, if i insert
>rows from sql prompt, then i can get the currval for the sequence. but
>if i insert it from java programming interface i can't get the currval
>for that sequence. my statement is like this
> select <sequence_name>.currval from dual;
> it is giving error like
> session is not defined yet
> invalid column name
>but from sql prompt its working only problem with java programming
>interface.
>
>hoque
-- Pete FinniganReceived on Mon Aug 13 2001 - 08:21:32 CDT