Package java.sql

Examples of java.sql.PreparedStatement.executeUpdate()


            else
               preStatement.setString(PERSISTENT, "F");
            preStatement.setLong(SIZE_IN_BYTES, sizeInBytes);
            ByteArrayInputStream blob_stream = new ByteArrayInputStream(blob);
            preStatement.setBinaryStream(BLOB, blob_stream, blob.length); // (int)sizeInBytes);
            int num = preStatement.executeUpdate();

            if (num == 0) {
               errors++;
               System.out.println("Update failed num=0");
            }
View Full Code Here


         // Id
         preStatement.setLong(1, xbMeat.getRefCount());
         preStatement.setLong(2, xbMeat.getRefCount2());
         preStatement.setLong(3, xbMeat.getId());
         preStatement.setLong(4, xbMeat.getStoreId());
         preStatement.executeUpdate();
      } finally {
         if (preStatement != null)
            preStatement.close();
      }
   }
View Full Code Here

         if (timeout > 0)
            preStatement.setQueryTimeout(timeout);
         fillStatement(preStatement, xbMeat);
         preStatement.setLong(LAST_ROW + 1, xbMeat.getId());
         preStatement.setLong(LAST_ROW + 2, xbMeat.getStoreId());
         preStatement.executeUpdate();
      } finally {
         if (preStatement != null)
            preStatement.close();
      }
   }
View Full Code Here

         st.setString(CONTEXT, this.context);
         st.setString(KEY, key);
         st.setString(VALUE, prop.getValueRaw());
         st.setString(TYPE, prop.getType());
         st.setString(ENCODING, prop.getEncoding());
         int ret = st.executeUpdate();
         return ret != 0;
      }
      finally {
         if (st != null) {
            try {
View Full Code Here

         st.setString(1, prop.getValueRaw());
         st.setString(2, prop.getType());
         st.setString(3, prop.getEncoding());
         st.setString(4, this.context);
         st.setString(5, key);
         int ret = st.executeUpdate();
         return ret != 0;
      }
      finally {
         if (st != null) {
            try {
View Full Code Here

      try {
         conn = this.pool.reserve();
         conn.setAutoCommit(true);
         st = conn.prepareStatement(deleteSql);
         st.setString(1, key);
         return st.executeUpdate() != 0;
      }
      finally {
         if (st != null) {
            try {
               st.close();
View Full Code Here

         long limitId = limitEntry.getId();
         st.setLong(1, store.getId());
         st.setInt(2, limitPrio);
         st.setInt(3, limitPrio);
         st.setLong(4, limitId);
         return st.executeUpdate();
      }
      finally {
         if (st != null)
            st.close();
      }
View Full Code Here

      PreparedStatement preStatement = conn.prepareStatement(deleteAllSt);
      if (timeout > 0)
         preStatement.setQueryTimeout(timeout);
      try {
         preStatement.setLong(1, store.getId());
         return preStatement.executeUpdate();
      }
      finally {
         if (preStatement != null)
            preStatement.close();
      }
View Full Code Here

      oStmt = oConn.prepareStatement(sSQL);
      oStmt.setString(1, sTlPage);
      oStmt.setString(2, sPathPage);
      oStmt.setString(3, sGuPage);
      if (DebugFile.trace) DebugFile.writeln("PreparedStatement.executeUpdate()");
      oStmt.executeUpdate();
      oStmt.close();
    }

    if (DebugFile.trace) {
      DebugFile.decIdent();
View Full Code Here

    oStmt.execute();
    oStmt.close();

    oStmt = oConn.prepareStatement("UPDATE "+getTableName()+" SET "+DB.dt_modified+"="+DBBind.Functions.GETDATE+" WHERE "+sPrimaryKey+"=?");
    oStmt.setObject(1, get(sPrimaryKey), Types.CHAR);
    oStmt.executeUpdate();
    oStmt.close();

    if (DebugFile.trace) {
      DebugFile.decIdent();
      DebugFile.writeln("End AbstractOrder.insertLine()");
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.