Examples of CallableStatement


Examples of java.sql.CallableStatement

          oRSet.close();
        }
        oDlte.close();
      }
      else {
        CallableStatement oCall = oConn.prepareCall("{ call k_sp_del_mime_msg(?) }");
        for (int m=0; m<iObjs; m++) {
          oCall.setString(1, oObjs.getString(0,m));
          oCall.execute();
        }
        oCall.close();
      }
    } // fi (exists(k_mime_msgs))

    oObjs = null;

    if (DBBind.exists(oConn, DB.k_x_company_prods, "U")) {

      oStmt = oConn.createStatement();

      if (DebugFile.trace)
        DebugFile.writeln("Statement.executeUpdate(DELETE FROM " + DB.k_x_company_prods + " WHERE " + DB.gu_category + "='" + sCategoryGUID + "')");

      oStmt.executeUpdate("DELETE FROM " + DB.k_x_company_prods + " WHERE " + DB.gu_category + "='" + sCategoryGUID + "'");

      oStmt.close();
    } // fi (k_x_company_prods)

    if (DBBind.exists(oConn, DB.k_x_contact_prods, "U")) {

      oStmt = oConn.createStatement();

      if (DebugFile.trace)
        DebugFile.writeln("Statement.executeUpdate(DELETE FROM " + DB.k_x_contact_prods + " WHERE " + DB.gu_category + "='" + sCategoryGUID + "')");

      oStmt.executeUpdate("DELETE FROM " + DB.k_x_contact_prods + " WHERE " + DB.gu_category + "='" + sCategoryGUID + "'");

      oStmt.close();
    } // fi (k_x_contact_prods)

    // Saca la lista de categorías hijas de primer nivel y repite el proceso de borrado
    LinkedList oChilds = oCat.browse(oConn, BROWSE_DOWN, BROWSE_BOTTOMUP);
    ListIterator oIter = oChilds.listIterator();

    while (oIter.hasNext()) {
      oCat = (Category) oIter.next();
      oCat.delete(oConn);
    } // wend

    if (oConn.getDataBaseProduct()==JDCConnection.DBMS_POSTGRESQL) {
      if (DebugFile.trace) DebugFile.writeln("Connection.executeQuery(SELECT k_sp_del_category_r ('" + sCategoryGUID + "'))");
      oStmt = oConn.createStatement();
      oStmt.executeQuery("SELECT k_sp_del_category_r ('" + sCategoryGUID + "')");
      oStmt.close();
      bRetVal = true;
    } else {
      if (DebugFile.trace) DebugFile.writeln("Connection.prepareCall({call k_sp_del_category_r('" + sCategoryGUID + "')})");
      CallableStatement oCall = oConn.prepareCall("{call k_sp_del_category_r ('" + sCategoryGUID + "')}");
      bRetVal = oCall.execute();
      oCall.close();
    }

    if (DebugFile.trace) {
      DebugFile.decIdent();
      DebugFile.writeln("End Category.delete() : " + String.valueOf(bRetVal));
View Full Code Here

Examples of org.apache.derby.client.am.CallableStatement

     */
    public CallableStatement newCallableStatement(Agent agent,
            org.apache.derby.client.am.Connection connection,
            String sql,int type,int concurrency,
            int holdability,ClientPooledConnection cpc) throws SqlException {
        return new CallableStatement(agent,connection,sql,type,
                concurrency,holdability,cpc);
    }
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.