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

Home -> Community -> Usenet -> c.d.o.server -> Re: Problems with nextval and currval calling JAVA and Oracle 9i

Re: Problems with nextval and currval calling JAVA and Oracle 9i

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 22 Jan 2004 22:00:13 -0600
Message-ID: <uy8rznwq5.fsf@standardandpoors.com>


On 22 Jan 2004, info_at_agrv.de wrote:

> The problem is, that i can get the nextval but not the
> currval. To get these values I'm using these calls:
>
> int fid_nextval = SequenceBean.getNextval_fid();
> int fid_currval = SequenceBean.getCurrval_fid();
>
> Here I get the Value for fid_nextval but no value for
> fid_currval.
>
> Some Ideas to handle these problem ?

You didn't show where you were asking for currval, but you did show two methods, both establishing a connection. Currval only works when you ask for it on the same connection that previously asked for nextval.

I'd suggest opening up a couple of sqlplus session and playing with nextval/currval calls making sure you understand how they work. Then, coding java around it will be simple.

-- 
Galen Boyer
Received on Thu Jan 22 2004 - 22:00:13 CST

Original text of this message

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