Announcement Announcement Module
Collapse
No announcement yet.
How to get resultset from sqlmapclienttemplate? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to get resultset from sqlmapclienttemplate?

    I am using spring with ibatis and i am having one problem that one of my DB2 stored procedure is returning resultset without specfying any out parameter and i dont know how to handle this situation.

    I red one article, if this is the situation i have to use the "queryforobject" method from sqlmapclienttemplate.

    But i dont know how to use this method.

    If any one is having example thats help me alot

    Thanks

  • #2
    I hope this will help you

    Code:
    String name="abc";
    String test=(String)getSqlMapClientTemplate().queryForObject(
    					"system.getTestString",name)
    Code:
     <select id="getTestString" parameterClass="String"
    		resultClass="String">
    		<![CDATA[			
               select test
                      from testInfo
                      where name=#name#
    		]]>
    	</select>

    Comment

    Working...
    X