Rajesh Kumar S

Greenhorn
+ Follow
since Apr 28, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rajesh Kumar S

Hi Vidhya,

Thank you very much for the help. But i stuck with the same. I am getting column names as cell values instead of results . Please help me regarding this. Below is my code.









For above query , result is 2 rows


HI Vidhya,

Thanks a lot :-) You saved me from hell..

Also may i know the value of CommonTokens.RESULT_ROWS_TOKEN.

I'm not able to get Resultset as it is retrieving null eventhough results are there . please help me regarding this.

I'm just getting ResultSet from the ResultGetter
public class ResultSetHandlerCallback implements TypeHandlerCallback {

public ResultSet getResult(ResultGetter getter) throws SQLException {
ResultSet resultSet = getter.getResultSet();
System.out.println("resultSet "+resultSet ); // Here its returing null.
return resultSet;
}

@Override
public void setParameter(ParameterSetter arg0, Object arg1)
throws SQLException {
// TODO Auto-generated method stub

}

@Override
public Object valueOf(String arg0) {
// TODO Auto-generated method stub
return null;
}
}

public class ResultSetMap {


private ResultSet resultSet;
public ResultSet getResultSet() {

return resultSet;
}

public void setResultSet(ResultSet resultSet) {
this.resultSet = resultSet;
}
}


SQLMAP file :-
<typeAlias type="com.logo.customermemory.eclipse.dao.impl.ResultSetMap" alias="resultSetMap" />

<resultMap id = "resultSetMapResult" class = "resultSetMap">
<result property = "resultSet" typeHandler = "com.logo.customermemory.eclipse.dao.impl.ResultSetHandlerCallback" />
</resultMap>

<select id="defaultGroupOrderingQuery" parameterClass="groupSearchVO" resultMap="resultSetMapResult">
SELECT * FROM (
SELECT ROWNUM rnum ,CMG.* FROM (
SELECT * FROM (
<include refid="outerQuery"/>
(
<include refid="getRowNumInnerQuery"/>
AND EVENT_STATUS <![CDATA[ <= ]]> 3 ))
UNION ALL
SELECT * FROM (
<include refid="outerQuery"/>
(
<include refid="getRowNumInnerQuery"/>
AND EVENT_STATUS > 3 )
) )CMG )
</select>


Same query if i run in SQL Command ,result is 2 rows...So,please help me regarding this.

Thank you very much for your support.
Hi Vidhya,

Please post me the way and code for retrieving metadata using iBatis. I'm battling regarding same for so many days.Thanks in Adv...:-)

I am using a Query "Select * from MyTable" . Do you know how to retrieve metadata from the same using iBatis . Result may contain multiple results (rows)