}
}
public String runSelectCachedRowset() throws SQLException, IOException, ClassNotFoundException {
CachedRowSet cachedRs = null;
cachedRs = new CachedRowSet();
cachedRs.setCommand( "select * from clob1" );
getConnection();
cachedRs.execute( conn );
freeConnection( conn );
// Iterate through the result and print the employee names
Writer writer = new StringWriter();
while ( cachedRs.next() ) {
// if (cachedRs.isBeforeFirst() || cachedRs.isLast() )
// System.out.println("no rows ...");
// cachedRs.absolute(++i) ;
System.out.println( cachedRs.getType() );
BufferedReader is = new BufferedReader( cachedRs.getClob( 1 ).getCharacterStream() );
writer.write( is.readLine() );
//System.out.println(cachedRs.getString(1));
}
writer.flush();
writer.close();