Return-Path: Delivered-To: apmail-incubator-ibatis-user-java-archive@www.apache.org Received: (qmail 37937 invoked from network); 6 Apr 2005 16:37:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Apr 2005 16:37:18 -0000 Received: (qmail 12422 invoked by uid 500); 6 Apr 2005 16:37:17 -0000 Delivered-To: apmail-incubator-ibatis-user-java-archive@incubator.apache.org Received: (qmail 12397 invoked by uid 500); 6 Apr 2005 16:37:17 -0000 Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Precedence: bulk Reply-To: ibatis-user-java@incubator.apache.org List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list ibatis-user-java@incubator.apache.org Received: (qmail 12376 invoked by uid 99); 6 Apr 2005 16:37:16 -0000 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=FORGED_RCVD_HELO,UPPERCASE_25_50 X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from sportaccess.com (HELO s3-xchng.spak.sion) (213.221.129.239) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 06 Apr 2005 09:37:15 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message Subject: Using a stored proc in selectKey? MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 6 Apr 2005 18:35:55 +0200 Message-ID: <6C347C948C69184B83AE342FEDFFFD8615A580@s3-xchng.spak.sion> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Using a stored proc in selectKey? Thread-Index: AcU6xrRAgmTGYRSZSlmiTQxAvL2chA== From: "Adriano Labate" To: X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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=20 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 section? Thanks, Adriano