ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Min Hui" <min...@dayamega.com>
Subject RE: Sample DataMapper for MS-SQL Server's stored procedure
Date Mon, 18 Sep 2006 09:35:23 GMT
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="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