• Post Reply Bookmark Topic Watch Topic
  • New Topic

iBatis query

 
Viidhya Kishore
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we pass in a SQL statement to iBatis?
Like,
I currently use
this.getSqlMapClientTemplate().queryForList("singleSelect", params)
in my application.
However a situation has arised where the user will build the sql st the JSP and the sql is to be passed into the DAO.
Since we are using iBatis,where the sql is read from the map xml,
I would like to know if I can somehow pass the sql into the iBatis for execution and retrieval of resultset.

Thanks,
-Vidhya
 
Dhananjay Patkar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
You can try out dynamic sql in iBatis.
I hope that will solve your problem as long as ,the query you are firing is differs in where clause...

Cheers,
Dhananjay
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!