substitutions.put(":expt_id:", exptId);
    private void newTrial(String idType, String trialName)        throws SQLException    {        String trialIdPrefix = idType + "-";        substitutions.put(":trial_id_pattern:", trialIdPrefix + "____");        substitutions.put(":trial_type:", idType);        DecimalFormat trialIdFormat =            new DecimalFormat(trialIdPrefix + "0000");        ResultSet rs =            executeQuery(stmt, dbp.getQuery(QUERY_MAX_TRIAL_ID,                                            substitutions));        trialId = null;        if (rs.next()) {            String maxId = rs.getString(1);            if (maxId != null) {                try {                    int n = trialIdFormat.parse(maxId).intValue();                    trialId = trialIdFormat.format(n + 1);                } catch (Exception e) {                    e.printStackTrace();                    // Use default                }            }        }        if (trialId == null) trialId = trialIdFormat.format(1);        substitutions.put(":trial_id:", trialId);        substitutions.put(":expt_id:", exptId);        substitutions.put(":description:", "Modified Trial");        substitutions.put(":trial_name:", trialName);        executeUpdate(dbp.getQuery(INSERT_TRIAL_ID, substitutions));    }