Return-Path: Delivered-To: apmail-ibatis-user-cs-archive@www.apache.org Received: (qmail 40316 invoked from network); 18 Sep 2006 09:57:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Sep 2006 09:57:39 -0000 Received: (qmail 49431 invoked by uid 500); 18 Sep 2006 09:57:39 -0000 Delivered-To: apmail-ibatis-user-cs-archive@ibatis.apache.org Received: (qmail 49420 invoked by uid 500); 18 Sep 2006 09:57:39 -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 49409 invoked by uid 99); 18 Sep 2006 09:57:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Sep 2006 02:57:39 -0700 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 [202.162.198.50] (HELO mail.dayamega.com) (202.162.198.50) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 18 Sep 2006 02:57:29 -0700 Received: (qmail 48690 invoked from network); 18 Sep 2006 16:35:44 +0700 Received: from minhui.dayamega.com (HELO MinHui) (192.168.3.30) by 0 with SMTP; 18 Sep 2006 16:35:44 +0700 From: "Min Hui" To: Subject: RE: Sample DataMapper for MS-SQL Server's stored procedure Date: Mon, 18 Sep 2006 16:35:23 +0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0036_01C6DB40.70B13790" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 In-Reply-To: <787276B82BCACA41857E3B4DF8C207C205B2CC@TEHRAN.corp.pdsr.com> Thread-Index: AcbbAJcZjhTsS6w3R+KBW1w8yPW5NAAAOTKgAADzSeA= X-Virus-Checked: Checked by ClamAV on apache.org Message-Id: <20060918095738.72ADF10FB014@asf.osuosl.org> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_0036_01C6DB40.70B13790 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hello Jehanzeb, Thanks for your quick response and very helpful tips! After debugging with Profiler, I found that the return record set have some wrong aliases that have been mapped in resultMap. That's why iBatis return the error. After modify the aliases, the store procedure is running properly. Thanks again Regards, Min Hui _____ From: Jehanzeb Musani [mailto:jehanzeb.musani@pdsr.com] Sent: Monday, September 18, 2006 4:11 PM To: user-cs@ibatis.apache.org Subject: RE: Sample DataMapper for MS-SQL Server's stored procedure Hello If you are using Sql Server, then run the profiler and check the statement that IBatis generated to execute your stored procedure. First try to sort out what is causing the error; I mean the error when IBatis is trying to execute the stored procedure and setting the parameter passed by you or when IBatis is trying to populate your specified class from the resultset. For this I will suggest you to first try to execute the procedure that does not have any parameter. It will be helpful if you can copy the relevant extracts from the configuration files (Statements, parameter map and result map) and from the code files (the class you are specifying in parameter and result maps, the calling code). Regards, Jehanzeb _____ From: Min Hui [mailto:minhui@dayamega.com] Sent: Monday, September 18, 2006 12:58 PM To: user-cs@ibatis.apache.org Subject: Sample DataMapper for MS-SQL Server's stored procedure Hi everybody, I am newbie with iBatis.NET. Currently I am still learning the framework. I have problem when testing call a store procedure with QueryForList() function. I have created the stored procedure named SP_Get_Person that has one argument @PER_ID int. The sp is just select 1 record based on PER_ID passed. Here are mapper XML: SP_Get_Person . When running the application, I got error: "An unhandled exception of type System.IndexOutOfRangeException occurred in ibatisnet.datamapper.dll I am very appreciate for any help Regards, Min Hui ------=_NextPart_000_0036_01C6DB40.70B13790 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

Hello = Jehanzeb,

 

Thanks for your quick response and = very helpful tips!

 

After debugging with Profiler, I = found that the return record set have some wrong aliases that have been mapped = in resultMap. That’s why iBatis return the error. After modify the = aliases, the store procedure is running properly.

 

Thanks = again

 

 

Regards,

Min = Hui

 

 

 

 


From: = Jehanzeb Musani [mailto:jehanzeb.musani@pdsr.com]
Sent: Monday, September = 18, 2006 4:11 PM
To: = user-cs@ibatis.apache.org
Subject: RE: Sample = DataMapper for MS-SQL Server's stored procedure

 

Hello =

 

If you = are using Sql Server, then run the profiler and check the statement that IBatis = generated to execute your stored procedure. First try to sort out what is causing = the error; I mean the error when IBatis is trying to execute the stored = procedure and setting the parameter passed by you or when IBatis is trying to = populate your specified class from the resultset. For this I will suggest you to = first try to execute the procedure that does not have any = parameter.

 

It will = be helpful if you can copy the relevant extracts from the configuration = files (Statements, parameter map and result map) and from the code files (the = class you are specifying in parameter and result maps, the calling = code).

 

Regards,

Jehanzeb

 


From: Min = Hui [mailto:minhui@dayamega.com]
Sent: Monday, September = 18, 2006 12:58 PM
To: = user-cs@ibatis.apache.org
Subject: Sample = DataMapper for MS-SQL Server's stored procedure

 

Hi everybody,

 

I am newbie with iBatis.NET. Currently I am still = learning the framework. I have problem when testing call a store procedure with QueryForList() function.

 

I have created the stored procedure named = SP_Get_Person that has one argument @PER_ID int. The sp is just select 1 record based on = PER_ID passed. Here are mapper XML:

 

 

<procedure id=3D"SP_GetPerson" parameterMap=3D"spParam" = resultMap=3D"SelectAllResult">

         =             &= nbsp;  SP_Get_Person

</procedure>

 

<parameterMap id=3D"spParam" class=3D"Person">

         =             &= nbsp;  <parameter property=3D"Id" column=3D"PER_ID" = />

</parameterMap>

 

 

When running the application, I got error: “An unhandled exception of type System.IndexOutOfRangeException occurred in = ibatisnet.datamapper.dll

 

I am very appreciate for any = help

 

 

Regards,

Min Hui

 

 

 

 

 

------=_NextPart_000_0036_01C6DB40.70B13790--