Package java.sql

Examples of java.sql.CallableStatement.wasNull()


        assertFalse(op.wasNull());

        op.setString(2, "39.345");
        op.execute();
        assertEquals("56.34", op.getBigDecimal(1).toString());
        assertFalse(op.wasNull());

        op.setString(2, "83");
        try {
            op.execute();
            fail("FAIL - execution ok on out of range out parameter");
View Full Code Here


        // can we get an IN param?
        op.setString(2, "49.345");
        op.execute();
        assertEquals("66.34", op.getBigDecimal(1).toString());
        assertFalse(op.wasNull());

        try {
            op.getString(2);
            fail("FAIL OP4 GET 49.345 >" + op.getString(2) + "< null ? "
                    + op.wasNull());
View Full Code Here

        assertFalse(op.wasNull());

        try {
            op.getString(2);
            fail("FAIL OP4 GET 49.345 >" + op.getString(2) + "< null ? "
                    + op.wasNull());
        } catch (SQLException sqle) {
            if (usingDerbyNetClient())
                assertSQLState("XJ091", sqle);
            else
                assertSQLState("XCL26", sqle);
View Full Code Here

        op.setString(2, null);

        op.setBigDecimal(1, null);
        op.execute();
        assertNull(op.getBigDecimal(1));
        assertTrue(op.wasNull());

        op.setBigDecimal(1, new BigDecimal("99"));
        op.execute();
        assertNull(op.getBigDecimal(1));
        assertTrue(op.wasNull());
View Full Code Here

        assertTrue(op.wasNull());

        op.setBigDecimal(1, new BigDecimal("99"));
        op.execute();
        assertNull(op.getBigDecimal(1));
        assertTrue(op.wasNull());

        op.setString(2, "23.5");
        op.setBigDecimal(1, new BigDecimal("14"));
        op.execute();
        assertEquals("37.50", op.getBigDecimal(1).toString());
View Full Code Here

        if (usingEmbedded()) {
            // Not run for client due to DERBY-2515
            op.execute();
            assertEquals("56.00", op.getBigDecimal(1).toString());
            assertFalse(op.wasNull());
        }

        op.setString(2, "67.99");
        op.setBigDecimal(1, new BigDecimal("32.01"));
        try {
View Full Code Here

        op.setString(2, "67.99");
        op.setBigDecimal(1, new BigDecimal("32.01"));
        try {
            op.execute();
            fail("FAIL OP4INOUT 32.01+67.99 >" + op.getBigDecimal(1)
                    + "< null ? " + op.wasNull());
        } catch (SQLException sqle) {
            assertSQLState("22003", sqle);
        }

        op.setString(2, "1");
View Full Code Here

        op.setString(2, "1");
        op.setBigDecimal(1, new BigDecimal("102.33"));
        try {
            op.execute();
            fail("FAIL OP4INOUT 1+102.33 >" + op.getBigDecimal(1) + "< null ? "
                    + op.wasNull());
        } catch (SQLException sqle) {
            assertSQLState("22003", sqle);
        }

        // now some checks to requirements for parameter setting.
View Full Code Here

      call = this.conn.prepareCall("{ call test60816_2(?, ?) }");
      call.setNull(1, Types.INTEGER);
      call.registerOutParameter(2, Types.INTEGER);
      call.execute();
      assertEquals(0, call.getInt(2));
      assertTrue(call.wasNull());

      call = this.conn.prepareCall("{ call test60816_1(?) }");
      call.setNull(1, Types.INTEGER);
      call.registerOutParameter(1, Types.INTEGER);
      call.execute();
View Full Code Here

      call = this.conn.prepareCall("{ call test60816_1(?) }");
      call.setNull(1, Types.INTEGER);
      call.registerOutParameter(1, Types.INTEGER);
      call.execute();
      assertEquals(0, call.getInt(1));
      assertTrue(call.wasNull());

      call = this.conn.prepareCall("{ call test60816_3(?) }");
      call.setNull(1, Types.INTEGER);
      call.registerOutParameter(1, Types.INTEGER);
      call.execute();
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.