Return-Path: Delivered-To: apmail-ibatis-user-cs-archive@www.apache.org Received: (qmail 35805 invoked from network); 25 Jan 2006 23:15:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Jan 2006 23:15:32 -0000 Received: (qmail 53574 invoked by uid 500); 25 Jan 2006 23:15:29 -0000 Delivered-To: apmail-ibatis-user-cs-archive@ibatis.apache.org Received: (qmail 53455 invoked by uid 500); 25 Jan 2006 23:15:29 -0000 Mailing-List: contact user-cs-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-cs@ibatis.apache.org Delivered-To: mailing list user-cs@ibatis.apache.org Received: (qmail 53308 invoked by uid 99); 25 Jan 2006 23:15:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2006 15:15:28 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [199.214.175.240] (HELO eipexc01.doe.min) (199.214.175.240) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2006 15:15:27 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C62205.2C76145C" Subject: Dynamically Selecting a Stored Procedure Date: Wed, 25 Jan 2006 16:15:05 -0700 Message-ID: <3A5CA242B710724586DC269AD7FC09330243FEC8@eipexc01.doe.min> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Dynamically Selecting a Stored Procedure Thread-Index: AcYiBSzZlI4i5pLhQPiOZnDbNSz+ug== From: "Nick Riebeek" To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------_=_NextPart_001_01C62205.2C76145C Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, =20 Just wondering if what I am attempting is at all possible, I am trying to dynamically select a stored procedure in my mapping file as below: =20 dbo.SelectInventoryFromHistory dbo.SelectInventoryFromCurrent =20 The problem I am running into is that it appears the parameterMap is not being populated when I add the tag and therefore I get an ArgumentOutOfRange exception because iBatis is trying to retrieve the values from the Parameter Map but no Parameter Map has been loaded. =20 Is there a way that I can specify an inline parameter map with a stored procedure call? =20 =20 Thanks, =20 =20 Nick This communication is intended for the use of the recipient to which it i= s addressed, and may contain confidential, personal and or privileged inf= ormation. Please contact us immediately if you are not the intended recip= ients of this communication, and do not copy, distribute, or take action = relying on it. Any communication received in error, or subsequent reply, = should be deleted or destroyed. ------_=_NextPart_001_01C62205.2C76145C Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello,

 

Just wondering if what I am attempting is at all possi= ble, I am trying to dynamically select a stored procedure in my mapping file as = below:

 

<procedure <= /font>id=3D"Inventory.Select"

          &= nbsp;        resultMap=3D"Inventory.SelectResult"

          &= nbsp;       parameterMap=3D"Inventory.ParameterMap" >

          &= nbsp;       <dynamic>

          &= nbsp;           &n= bsp; <isNotEmpty property=3D"EffectiveDate"= >

   &n= bsp;           &nb= sp;           &nbs= p;  dbo.SelectInventoryFromHistory

          &= nbsp;           &n= bsp; </isNotEmpty>

          &= nbsp;           &n= bsp; <isEmpty property=3D"EffectiveDate"= >

   &n= bsp;           &nb= sp;           &nbs= p;  dbo.SelectInventoryFromCurrent

          &= nbsp;           &n= bsp; </isEmpty>

          &= nbsp;       </dynamic>

 &nb= sp;          </procedure>

&nbs= p;

The problem I am running into is that it appears the parameterMap is not being populated when I add the <dynamic> tag an= d therefore I get an ArgumentOutOfRange exception because iBatis is trying = to retrieve the values from the Parameter Map but no Parameter Map has been loaded.

 

Is there a way that I can specify an inline parameter = map with a stored procedure call?

 

 

Thanks,

 

 

Nick

This communication is intended for the use of the recipient to which it i= s addressed, and may contain confidential, personal and or privileged inf= ormation. Please contact us immediately if you are not the intended recip= ients of this communication, and do not copy, distribute, or take action = relying on it. Any communication received in error, or subsequent reply, = should be deleted or destroyed.
------_=_NextPart_001_01C62205.2C76145C--