Package com.bleujin.framework.db.rowset

Examples of com.bleujin.framework.db.rowset.CachedRowSet


        }
    }

    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();
View Full Code Here

TOP

Related Classes of com.bleujin.framework.db.rowset.CachedRowSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.