Code example for PreparedStatement

Methods: executeUpdatesetInt

0
    try 
    { 
       stmt =
        conn.prepareStatement("insert into bootstrap_loginfo(srcid, logid) values(?,?)");
 
      stmt.setInt(1, _srcid);
      stmt.setInt(2, _currlogid);
      stmt.executeUpdate();
    } 
    catch (SQLException e)
    { 
      LOG.error("Error occurred when saving source info to database" + e);
      throw e;
    } finally { 
    	DBHelper.close(stmt);
    } 
  } 
   
  @Override 
  public String toString()
Connect your IDE to all the code out there  Get Codota for Java