ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adriano Labate" <adriano.lab...@sportaccess.com>
Subject Using a stored proc in selectKey?
Date Wed, 06 Apr 2005 16:35:55 GMT
Hi,

Is it possible to call an Oracle stored procedure in order to get the id
in the selectKey tag?

My stored proc is defined as :

CREATE OR REPLACE PROCEDURE SP_GET_NEXT_ID(nIDTYPE IN NUMBER, nNEXTID
OUT NUMBER) as
nIDTYPEBUF NUMBER;
nTheNewId NUMBER;
...

Where 

IN : The idtype to be generated
        1,PERSONID
        2,PERSONTYPEID
        3,CATEGORYID
        ...
OUT : The next id for the type input (nIDTYPE)
      -1 (Error in the IDTYPE input)


I know I can use an Oracle sequence, but the reason we are using a
stored proc is because we don't want the DB client has to deal with a
proprietary sequence.

So, is it possible to call that stored proc in the <selectKey> section?

Thanks,
Adriano

Mime
View raw message