Package java.sql

Examples of java.sql.CallableStatement.clearParameters()


            cs.registerOutParameter(2, Types.INTEGER);
            cs.setInt(1, i);
            cs.execute();
            assertEquals(1, cs.getInt(1));
            assertEquals(i, cs.getInt(2));
            cs.clearParameters();
        }
    }

}
View Full Code Here


            fail("FAIL - execution ok on out of range out parameter");
        } catch (SQLException sqle) {
            assertSQLState("22003", sqle);
        }

        op.clearParameters();
        try {
            // b not set
            op.execute();

            fail("FAIL - b not set");
View Full Code Here

        } catch (SQLException sqle) {
            assertSQLState("22003", sqle);
        }

        // now some checks to requirements for parameter setting.
        op.clearParameters();
        try {
            // a,b not set
            op.execute();
            fail("FAIL - a,b not set");
        } catch (SQLException sqle) {
View Full Code Here

            op.execute();
            fail("FAIL - a,b not set");
        } catch (SQLException sqle) {
            assertSQLState("07000", sqle);
        }
        op.clearParameters();
        op.setString(2, "2");
        try {
            // a not set
            op.execute();
            fail("FAIL - a  not set");
View Full Code Here

            op.execute();
            fail("FAIL - a  not set");
        } catch (SQLException sqle) {
            assertSQLState("07000", sqle);
        }
        op.clearParameters();
        op.setBigDecimal(1, new BigDecimal("33"));
        try {
            // b not set
            op.execute();
            fail("FAIL - b  not set");
View Full Code Here

            indexedOutParamToTest == namedOutParamToTest);
        assertTrue("Output value not returned correctly",
            indexedOutParamToTest == 6);

        // Start over, using named parameters, this time
        storedProc.clearParameters();
        storedProc.setInt("x", 32);
        storedProc.registerOutParameter("y", Types.INTEGER);

        storedProc.execute();
View Full Code Here

            fail("FAIL - execution ok on out of range out parameter");
        } catch (SQLException sqle) {
            assertSQLState("22003", sqle);
        }

        op.clearParameters();
        try {
            // b not set
            op.execute();

            fail("FAIL - b not set");
View Full Code Here

        } catch (SQLException sqle) {
            assertSQLState("22003", sqle);
        }

        // now some checks to requirements for parameter setting.
        op.clearParameters();
        try {
            // a,b not set
            op.execute();
            fail("FAIL - a,b not set");
        } catch (SQLException sqle) {
View Full Code Here

        } catch (SQLException sqle) {
            assertSQLState("07000", sqle);
        }
        if (usingEmbedded()) {
            // Do not run for client until DERBY-2516 is fixed
            op.clearParameters();
            op.setString(2, "2");
            try {
                // a not set
                op.execute();
                fail("FAIL - a  not set");
View Full Code Here

                fail("FAIL - a  not set");
            } catch (SQLException sqle) {
                assertSQLState("07000", sqle);
            }
        }
        op.clearParameters();
        op.setBigDecimal(1, new BigDecimal("33"));
        try {
            // b not set
            op.execute();
            fail("FAIL - b  not set");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.