Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

problem in cached rowset

 
Ranch Hand
Posts: 142
  • 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.>
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Refer to the interface which RowSet implements.

Namely, ResultSet
 
Today you are you, that is turer than true. There is no one alive who is youer than you! - Seuss. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic