3 Replies Latest reply on Oct 1, 2002 12:40 PM by Michael Mazur

    CMP and Obtaining nextval from an Oracle Sequence

    Michael Mazur Newbie

      Is there a way to have the container return the nexval of an Oracle Sequence besides writing jdbc code????

      The primary key of my Oracle table is an Integer which is linked to an Oracle sequence. I have done a work-around by writing some jdbc code within my bean class's ejbCreate method to get the sequence.nextval, then returning that value.

      in doing the workaroound, i seem to have created a mix of BMP/CMP. there must be a way for the container to return the nextval.

      I also tried to write an ejbSelect method, but when you write the ejb-jar.xml query, how do you write the EJB-QL select statement??? the abstract schema name refers to the Oracle Table not the SequenceName.