Code example for PreparedStatement

Methods: clearParameters

0
        } else 
            return conn.prepareStatement(sqlString);
    } 
 
    synchronized void releasePreparedStatement(String key, PreparedStatement ps) throws SQLException {
        ps.clearParameters();
        Vector avail = (Vector) preparedStatements.get(key);
        avail.add(ps);
    } 
 
    public long getId() { 
        return id;
    } 
     
    public Connection getConnection() {
        return conn;
    } 
 
    public static class JDBCPool { 
        // dictionary of database names with corresponding vector of connections 
        private Hashtable poolDictionary = new Hashtable();