ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jehanzeb Musani" <jehanzeb.mus...@pdsr.com>
Subject RE: Sample DataMapper for MS-SQL Server's stored procedure
Date Mon, 18 Sep 2006 09:11:19 GMT
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="SP_GetPerson" parameterMap="spParam"
resultMap="SelectAllResult">

                        SP_Get_Person

</procedure>

...

 

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

                        <parameter property="Id" column="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

 

 

 

 

 


Mime
View raw message