File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes problem in cached rowset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "problem in cached rowset" Watch "problem in cached rowset" New topic
Author

problem in cached rowset

Raj chiru
Ranch Hand

Joined: Aug 12, 2008
Posts: 141
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

Joined: Apr 13, 2009
Posts: 96
Refer to the interface which RowSet implements.

Namely, ResultSet
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in cached rowset