This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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
 
Similar Threads
SQL Question
What Is RowSet Explain With Example.
JDBC2.0 feature. rs.absolute and relative( )
Insert & Update
select and update using the same statement object