Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in cached rowset

 
Raj chiru
Ranch Hand
Posts: 142
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi....

do{
rowNum = mainRS.getRow();
ArrayList colValueList =
getColValueList(potPlannerVO,mainRS,colName,rowNum); HashMap maxAvgMap = null;
if(colValueList != null){
maxAvgMap =
getMaxAvg(potPlannerVO,colValueList);
String holderNo =
mainRS.getString("NEW_HHLD_NO") == null ? "" :
mainRS.getString("NEW_HHLD_NO");

dataStr +=holderNo + " | ";
dataStr += (String)maxAvgMap.get("MAX")
== null ? "" : (String)maxAvgMap.get("MAX") + " | ";
dataStr +=
(String)maxAvgMap.get("AVG3") == null ? "" : (String)maxAvgMap.get("AVG3")
+ " | ";
dataStr +=
(String)maxAvgMap.get("AVG6") == null ? "" : (String)maxAvgMap.get("AVG6")
+ " | ";
dataStr +=
(String)maxAvgMap.get("AVG12") == null ? "" :
(String)maxAvgMap.get("AVG12") + " | ";
for(int i=0;i<colValueList.size();i++)
dataStr +=
(String)colValueList.get(i) == null ? "" : (String)colValueList.get(i);
myDataValList.add(dataStr);
}
}while(mainRS.next());

Here mainRS is a cached rowset.

In preceding code In getColValueList() --- I have to access the data from the particular row
pointed by the row num.

Could you please tell me how to access that particular row.>
 
John Kimball
Ranch Hand
Posts: 96
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Refer to the interface which RowSet implements.

Namely, ResultSet
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic