Examples of prepareCall()


Examples of java.sql.Connection.prepareCall()

*/    
         {
            // base64_enc_clob(?)
            sql = "{? = call " + this.replPrefix + "test_clob(?,?,?,?)}"; // name text, content text)
            try {
               CallableStatement st = conn.prepareCall(sql);

               String test = "this is a simple base64 encoding test for clobs";
               st.setString(2, "BASE64_ENC_CLOB");
               st.setString(3, test);
               st.setString(4, "unused");
View Full Code Here

Examples of java.sql.Connection.prepareCall()

         }
         {
            // fill_blob_char(?)
            sql = "{? = call " + this.replPrefix + "test_clob(?,?,?,?)}"; // name text, content text)
            try {
               CallableStatement st = conn.prepareCall(sql);
               String result = "<col name=\"fill\">this is a simple test string for the fill_blob_char</col>";
               String test = "this is a simple test string for the fill_blob_char";
               st.setString(2, "FILL_BLOB_CHAR2");
               st.setString(3, test);
               st.setString(4, "fill");
View Full Code Here

Examples of java.sql.Connection.prepareCall()

      CallableStatement st = null;
      try {
         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);
View Full Code Here

Examples of java.sql.Connection.prepareCall()

            log.info("table '" + tableName + "' is already registered, will add directly an entry in the ENTRIES Table");
            String destAttrName = "?";
            if (destinations == null || destinations.length == 0)
               destAttrName = "NULL";
            String sql = "{? = call " + this.replPrefix + "check_tables(NULL,?,?,?," + destAttrName + ")}"; // name text, content text)
            CallableStatement st = conn.prepareCall(sql);
            st.setString(2, schema);
            st.setString(3, tableName);
            st.setString(4, ReplicationConstants.CREATE_ACTION);
            if (destinations != null && destinations.length != 0) {
               String post = "</desc>";
View Full Code Here

Examples of java.sql.Connection.prepareCall()

               buf.append("<attr id='").append(ReplicationConstants.STATEMENT_ID_ATTR).append("'>").append(statementId).append("</attr>\n");
               buf.append("<attr id='").append(ReplicationConstants.SQL_TOPIC_ATTR).append("'>").append(sqlTopic).append("</attr>\n");
               // buf.append("</desc>\n");
              
               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();
            }
View Full Code Here

Examples of java.sql.Connection.prepareCall()

    Connection conn = null;
    CallableStatement cStmt = null;
    int numUpdated = 0;
    try {
      conn = dataSource.getConnection();
      cStmt = conn.prepareCall("{call addImportFolder(?,?)};");     
      for(Folder folder : folders){
        cStmt.setInt(1,subscription.getId());
        cStmt.setInt(2,folder.getId());       
        cStmt.addBatch();       
      }     
View Full Code Here

Examples of java.sql.Connection.prepareCall()

    Connection conn = null;
    CallableStatement cStmt = null;
    int id = -1;
    try {
      conn = dataSource.getConnection();
      cStmt = conn.prepareCall("{call createSubscription(?,?,?,?,?,?)}");
      cStmt.setInt(1,subscription.getBookmark().getId());
      Date lastSync = subscription.getLastSync();
      if(lastSync != null){
        cStmt.setTimestamp(2,new Timestamp(lastSync.getTime()));
      }else{
View Full Code Here

Examples of java.sql.Connection.prepareCall()

    DaoResult<FeedSubscription> result = null;
    CallableStatement cStmt = null;
    Connection conn = null;
    try{           
      conn = dataSource.getConnection();
      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();
View Full Code Here

Examples of java.sql.Connection.prepareCall()

    Connection conn = null;
    CallableStatement cstmt = null;
    int numUpdated = 0;
    try {
      conn = dataSource.getConnection();
      cstmt = conn.prepareCall("call removeImportFolder(?,?)");
      int feedId = subscription.getId();   
      for(Folder folder : folders){
        cstmt.setInt(1,feedId);
        cstmt.setInt(2,folder.getId());       
        cstmt.addBatch();
View Full Code Here

Examples of java.sql.Connection.prepareCall()

    List<FeedSubscription> feeds = new ArrayList<FeedSubscription>();   
    CallableStatement cStmt = null;
    Connection conn = null;
    try{           
      conn = dataSource.getConnection();
      cStmt = conn.prepareCall("call findAutoImportSubscription(?);");     
      cStmt.setInt(1,ageHour);
      cStmt.execute();
      ResultSet rs = cStmt.executeQuery();
      while(rs.next()){
        FeedSubscription feed = createFeedSubscriptionObject(rs);       
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.