Add remapResults="true" to your select tag.
_____ From: Yuvraj Shinde [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 12, 2007 11:14 AM To: [email protected] Cc: Yuvraj Shinde Subject: how to execute a complete dynamic querry in ibatis(urgent) Hi all, I am executing a dynamic query using <dynamic> tag. When I call this select query for first time it works well. But for second time when I pass new query it doesn't work. As ibatis use prepared statement to construct a query. It always refer to first query columns and give exception for second query. Is there is any way to disable prepared statement in ibatis.can some body give the solution. Following is mine query. <select id="SEARCH_QUERRY_DATA" parameterClass="String" resultClass="java.util.HashMap" > <dynamic> $querryString$ </dynamic> </select> First time value of querryString is " select * from bank" - works fine. Second time value of querryString is " select * from cust" - doesn't works as query refer to columns of first table ie bank because of prepared statemant. Regards Yuvraj Yuvraj Shinde . Senior Software Engineer - Zainet. SunGard . Offshore Services . Pride Portal,CTS No 103A/5A/1A/1B Bhamburda,Senapati Bapat Road, shivajinagar,Pune 411016 Tel Direct +91 20 66248045 . Main +91 20 66248000 . Fax +91 20 25606222 <blocked::mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] . <blocked::http://www.sungard.com> www.sungard.com
