Package org.apache.derbyTesting.functionTests.tests.jdbcapi

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.Wrapper41Statement


        conn.setHoldability( ResultSet.CLOSE_CURSORS_AT_COMMIT );
        conn.setAutoCommit( true );

        PreparedStatement   ps;
        ResultSet   rs;
        Wrapper41Statement  wrapper;

        ps = conn.prepareStatement( "values ( 1 )" );
        println( "Testing implicit closure WITH autocommit on a " + ps.getClass().getName() );
       
        wrapper = new Wrapper41Statement( ps );
        wrapper.closeOnCompletion();

        rs = ps.executeQuery();
        rs.next();
        rs.next();

        assertTrue( rs.isClosed() );
        assertTrue( ps.isClosed() );

        conn.setAutoCommit( false );

        // now retry the experiment with an explicit commit

        ps = conn.prepareStatement( "values ( 1 )" );
        println( "Testing implicit closure WITHOUT autocommit on a " + ps.getClass().getName() );
       
        wrapper = new Wrapper41Statement( ps );
        wrapper.closeOnCompletion();

        rs = ps.executeQuery();
        rs.next();
        rs.next();
View Full Code Here


        conn.setHoldability( ResultSet.CLOSE_CURSORS_AT_COMMIT );
        conn.setAutoCommit( true );

        PreparedStatement   ps;
        ResultSet   rs;
        Wrapper41Statement  wrapper;

        ps = conn.prepareStatement( "values ( 1 )" );
        println( "Testing implicit closure WITH autocommit on a " + ps.getClass().getName() );
       
        wrapper = new Wrapper41Statement( ps );
        wrapper.closeOnCompletion();

        rs = ps.executeQuery();
        rs.next();
        rs.next();

        assertTrue( rs.isClosed() );
        assertTrue( ps.isClosed() );

        conn.setAutoCommit( false );

        // now retry the experiment with an explicit commit

        ps = conn.prepareStatement( "values ( 1 )" );
        println( "Testing implicit closure WITHOUT autocommit on a " + ps.getClass().getName() );
       
        wrapper = new Wrapper41Statement( ps );
        wrapper.closeOnCompletion();

        rs = ps.executeQuery();
        rs.next();
        rs.next();
View Full Code Here

        conn.setHoldability( ResultSet.CLOSE_CURSORS_AT_COMMIT );
        conn.setAutoCommit( true );

        PreparedStatement   ps;
        ResultSet   rs;
        Wrapper41Statement  wrapper;

        ps = conn.prepareStatement( "values ( 1 )" );
        println( "Testing implicit closure WITH autocommit on a " + ps.getClass().getName() );
       
        wrapper = new Wrapper41Statement( ps );
        wrapper.closeOnCompletion();

        rs = ps.executeQuery();
        rs.next();
        rs.next();

        assertTrue( rs.isClosed() );
        assertTrue( ps.isClosed() );

        conn.setAutoCommit( false );

        // now retry the experiment with an explicit commit

        ps = conn.prepareStatement( "values ( 1 )" );
        println( "Testing implicit closure WITHOUT autocommit on a " + ps.getClass().getName() );
       
        wrapper = new Wrapper41Statement( ps );
        wrapper.closeOnCompletion();

        rs = ps.executeQuery();
        rs.next();
        rs.next();
View Full Code Here

TOP

Related Classes of org.apache.derbyTesting.functionTests.tests.jdbcapi.Wrapper41Statement

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.