Package java.sql

Examples of java.sql.CallableStatement.executeUpdate()


        ps.setString(2, tableName);
        ps.setString(3, fileName);
        ps.setString(4, colDel);
        ps.setString(5, charDel);
        ps.setString(6, codeset);
        ps.executeUpdate();
        ps.close();
    }

    /**
     * Perform import using SYSCS_UTIL.SYSCS_IMPORT_TABLE procedure.
View Full Code Here


        ps.setString(3, fileName);
        ps.setString(4, colDel);
        ps.setString(5, charDel);
        ps.setString(6, codeset);
        ps.setInt(   7, replace);
        ps.executeUpdate();
        ps.close();
    }

    /**
     * Produce an expect row set given the order and asc/desc info.
View Full Code Here

           
            // Set to be read-only via the procedure which uses
            // the normal user name.
            csSetAccess.setString(1, normalUserName);
            csSetAccess.setString(2, "READONLYACCESS");
            csSetAccess.executeUpdate();
            commit();
           
            connUser = openDefaultConnection(jdbcUserName, password);
            // DERBY-2738 (network client always returns false for isReadOnly)
            if (usingEmbedded())
View Full Code Here

        assertFalse(cStmt.execute());
        assertEquals(2f, cStmt.getInt(1), .001);
        assertEquals("java.lang.Integer", cStmt.getObject(1).getClass()
            .getName());

        assertEquals(-1, cStmt.executeUpdate());
        assertEquals(2f, cStmt.getInt(1), .001);
        assertEquals("java.lang.Integer", cStmt.getObject(1).getClass()
            .getName());

        if (!isRunningOnJdk131()) {
View Full Code Here

          assertFalse(cStmt.execute());
          assertEquals(4f, cStmt.getInt(1), .001);
          assertEquals("java.lang.Integer", cStmt.getObject(1).getClass()
              .getName());
         
          assertEquals(-1, cStmt.executeUpdate());
          assertEquals(4f, cStmt.getInt(1), .001);
          assertEquals("java.lang.Integer", cStmt.getObject(1).getClass()
              .getName());
        }
       
View Full Code Here

        assertEquals(0f, cStmt.getInt(1), .001);
        assertEquals(true, cStmt.wasNull());
        assertEquals(null, cStmt.getObject(1));
        assertEquals(true, cStmt.wasNull());

        assertEquals(-1, cStmt.executeUpdate());
        assertEquals(0f, cStmt.getInt(1), .001);
        assertEquals(true, cStmt.wasNull());
        assertEquals(null, cStmt.getObject(1));
        assertEquals(true, cStmt.wasNull());
View Full Code Here

        assertFalse(cStmt.execute());
        assertEquals(4f, cStmt.getInt(1), .001);
        assertEquals("java.lang.Integer", cStmt.getObject(1).getClass()
            .getName());
       
        assertEquals(-1, cStmt.executeUpdate());
        assertEquals(4f, cStmt.getInt(1), .001);
        assertEquals("java.lang.Integer", cStmt.getObject(1).getClass()
            .getName());
      } finally {
        if (this.rs != null) {
View Full Code Here

                    + "END; "
                );
                statement.setLong(1, versionID);
                statement.registerOutParameter(2, java.sql.Types.BLOB);
               
                statement.executeUpdate();
               
                // do these two lines using reflection
                // BLOB blob = (BLOB) statement.getBlob(2);
                // OutputStream os = blob.getBinaryOutputStream();
               
View Full Code Here

        int locator = -1;
        //call the stored procedure to return the created locator.
        CallableStatement cs  = prepareCall
            ("? = CALL SYSIBM.BLOBCREATELOCATOR()");
        cs.registerOutParameter(1, java.sql.Types.INTEGER);
        cs.executeUpdate();
        locator = cs.getInt(1);
        //verify if the locator rturned and expected are equal.
        //remember in setup a locator is already created
        //hence expected value is 2
        assertEquals("The locator values returned by " +
View Full Code Here

        cs  = prepareCall("? = CALL SYSIBM.BLOBGETLENGTH(?)");
        cs.registerOutParameter(1, java.sql.Types.BIGINT);
        cs.setInt(2, 1);
        try {
            cs.executeUpdate();
        } catch(SQLException sqle) {
            //on expected lines. The test was successful.
            return;
        }
        //The exception was not thrown. The test has failed here.
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.