Package java.sql

Examples of java.sql.CallableStatement.executeQuery()


         String sql = "{? = call " + this.replPrefix + "check_structure()}";
         conn = this.dbPool.reserve();
         conn.setAutoCommit(true);
         st = conn.prepareCall(sql);
         st.registerOutParameter(1, Types.VARCHAR);
         st.executeQuery();
      }
      catch (Exception ex) {
         conn = removeFromPool(conn, ROLLBACK_NO);
      }
      finally {
View Full Code Here


                  post = "<attr id='_forceSend'>true</attr>" + post;
               String destinationTxt = "<desc><attr id='_destination'>" + toString(destinations) + "</attr>" + post;
               st.setString(5, destinationTxt);
            }
            st.registerOutParameter(1, Types.VARCHAR);
            st.executeQuery();
            st.close();
            return false;
         }
         /*
         if (force) {
View Full Code Here

               String sqlTxt = "{? = call " + this.replPrefix + "prepare_broadcast(?)}";
               st = conn.prepareCall(sqlTxt);
               String value = buf.toString();
               st.setString(2, value);
               st.registerOutParameter(1, Types.VARCHAR);
               st.executeQuery();
            }
            finally {
               st.close();
            }
         }
View Full Code Here

   public void onCreateConnection(Connection conn) throws Exception {
         try {
            String sql = getSql(conn);
            CallableStatement st = conn.prepareCall(sql);
            st.setString(1, identifier);
            st.executeQuery();
         }
         catch (Exception ex) {
            ex.printStackTrace();
         }
   }
View Full Code Here

         st = conn.prepareCall(sql);
         st.setString(1, event);
         st.setLong(4, timeout / 1000L);
         st.registerOutParameter(2, Types.VARCHAR);
         st.registerOutParameter(3, Types.INTEGER);
         st.executeQuery();
      }
      finally {
         if (st != null)
            st.close();
      }
View Full Code Here

      else
         sql = "{call dbms_alert.remove(?)}";
      try {
         st = conn.prepareCall(sql);
         st.setString(1, event);
         st.executeQuery();
      }
      finally {
         if (st != null)
            st.close();
      }
View Full Code Here

         return true;
      CallableStatement cs = null;
      try {
         log.fine("Invoking '" + sqlCode + "'");
         cs = conn.prepareCall(sqlCode);
         cs.executeQuery();
      }
      catch (SQLException ex) {
         log.severe("An Exception occured when executing '" + sqlCode + "':" + ex.getMessage());
         ex.printStackTrace();
      }
View Full Code Here

      if (DebugFile.trace) DebugFile.writeln("Connection.prepareCall({call " + sTable + "()}");
      oStmt = oConn.prepareCall("{call " + sTable + "()}", iType, ResultSet.CONCUR_READ_ONLY);

      if (DebugFile.trace) DebugFile.writeln("Connection.executeQuery(" + sTable + ")");

      oRSet = oStmt.executeQuery();

      oMDat = oRSet.getMetaData();
      iColCount = oMDat.getColumnCount();
      ColNames = new String[iColCount];
View Full Code Here

      for (int p=0; p<aFilterValues.length; p++)
        oStmt.setObject(p+1, aFilterValues[p]);

      if (DebugFile.trace) DebugFile.writeln("Connection.executeQuery()");

      oRSet = oStmt.executeQuery();

      oMDat = oRSet.getMetaData();
      iColCount = oMDat.getColumnCount();
      ColNames = new String[iColCount];
View Full Code Here

      cStmt = conn.prepareCall("call pageSubscriptionByOwnerId(?,?,?,?);");
      cStmt.setInt(1,user.getId());
      cStmt.setInt(2,offset);
      cStmt.setInt(3,count);
      cStmt.registerOutParameter(4,Types.INTEGER);
      ResultSet rs = cStmt.executeQuery();
      while(rs.next()){
        FeedSubscription feed = createFeedSubscriptionObject(rs);       
        feeds.add(feed);
      }
      int size = cStmt.getInt(4);
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.