dynamic tabs?
Hi -
New to jsc2... I can build a dynamic tree from a cachedresultset, but cannot do the same with tabs in general... trying to retrieve 'products' from db and make a tabpage for each 'product'... see code attempt below:
try {
CachedRowSetXImpl rs = getSessionBean1().getLookupRowSet1();
rs.execute();
while (rs.next()) {
String product = rs.getString("lup_descr");
Tab newTab = new Tab(product);
}
rs.close();
} catch(SQLException ex) {
error("Tab Rowset SQL retrieve failed...");
}
Ideas what I'm doing wrong? Suggestions?Thanks!
Kevin
[634 byte] By [
yukhntr] at [2007-11-26 7:21:42]

# 1
It is difficult to tell exactly what you are trying to do, but I do notice that you are calling rs.close(). Typically, we recommend calling rs.release() on CachedRowSets, so that they can continue to be used. As the CachedRowSet.release() javadoc explains: "This method empties a rowset, as opposed to the close method, which marks the entire rowset as recoverable to allow the garbage collector the rowset's Java VM resources."
Another possibility is to use both dataproviders and CachedRowSets in combination, as documented in several JSC tutorials.
mbohm at 2007-7-6 19:04:46 >
