Hey folks,

 

 

I am having a problem getting this to work. Any help would be appreciated. What am trying to do is insert a person and return the Id that was used in inserting the person.

 

Target Database is Oracle 9.2

iBatis Version 2.1.7 - Jan 21, 2006

 

 

 

    <insert id="savePerson"  parameterClass="PersonObject" resultClass="int">
            <selectKey  property="personId" type="pre"  resultClass="int">

                   select SEQ_PERSON.nextval as seqId from dual

          </selectKey>

        INSERT INTO PERSON_TBL ( personId, name, age,gender) VALUES (#seqId#, #name#, #age#, #gender#)

    </insert> 

 

Error message is:

 

 

 

Reply via email to