ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Beekman" <n.beek...@wis.nl>
Subject RE: how to execute a complete dynamic querry in ibatis(urgent)
Date Wed, 12 Sep 2007 09:22:31 GMT
Since it's so urgent, I decided to drop all my work and help you first.
Hooray for the offshoring!

Now, onto the question, imho you're way too dynamic here, but you need
to use remapResults=true, see
http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+p
ass+in+a+dynamic+table+name+-+or+other+uncommon+parameters

 

I'd better get to work now, before my work will be offshored to you.

 

Niels

 

________________________________

From: Yuvraj Shinde [mailto:Yuvraj.Shinde@sos.sungard.com] 
Sent: woensdag 12 september 2007 11:14
To: user-java@ibatis.apache.org
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 yuvraj.shinde@sos.sungard.com
<blocked::mailto:yuvraj.shinde@sos.sungard.com>  * www.sungard.com
<blocked::http://www.sungard.com> 

	 

	 


Mime
View raw message