ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zoran Avtarovski <zo...@sparecreative.com>
Subject Re: Please help me.
Date Fri, 01 Jun 2007 11:57:04 GMT
In your SqlMap.xml try the following:

 <sqlMap namespace="Department">
 <select id="departmentcode" remapResults="true" parameterClass="String"
 resultClass="hashmap">
 select departmentcode from $value$.DEPARTMENT
 </select> 
 </sqlMap>
 

Then your Java code you have a few errors. You need to cast the result to a
hashmnap and you also need to pass the schema String as a parameter as
follows:

sqlMap.queryForList("Department.departmentcode", schema);

I also think you need to go over the online documentation. It's pretty good
for getting started. You'll find it's well worth the few hours reading.
Without the fundamentals you're going to be struggling.

Z.



Mime
View raw message