public int evaluateBatch(Connection connection, String sql, boolean continueOnError) throws DynaSqlException
public int evaluateBatch(String sql, boolean continueOnError) throws DynaSqlException
    public int evaluateBatch(Connection connection, String sql, boolean continueOnError) throws DynaSqlException    {        Statement statement    = null;        int       errors       = 0;        int       commandCount = 0;        try        {            statement = connection.createStatement();                        StringTokenizer tokenizer = new StringTokenizer(sql, ";");            while (tokenizer.hasMoreTokens())            {                String command = tokenizer.nextToken();                                // ignore whitespace                command = command.trim();                if (command.length() == 0)                {                    continue;                }                                commandCount++;                                if (_log.isDebugEnabled())                {                    _log.debug("About to execute SQL " + command);                }                try                {                    int results = statement.executeUpdate(command);                    if (_log.isDebugEnabled())                    {                        _log.debug("After execution, " + results + " row(s) have been changed");                    }                }                catch (SQLException ex)                {                    if (continueOnError)                    {                        System.err.println("SQL Command " + command + " failed with " + ex.getMessage());                        errors++;                    }                    else                    {                        throw new DynaSqlException("Error while executing SQL "+command, ex);                    }                }                // lets display any warnings                SQLWarning warning = connection.getWarnings();                while (warning != null)                {                    _log.warn(warning.toString());                    warning = warning.getNextWarning();                }                connection.clearWarnings();            }            _log.info("Executed "+ commandCount + " SQL command(s) with " + errors + " error(s)");        }        catch (SQLException ex)        {            throw new DynaSqlException("Error while executing SQL", ex);        }        finally        {            closeStatement(statement);        }        return errors;    }