System.setProperty("dbunit.database.supportBatchStatement", "true");
System.setProperty("dbunit.database.supportBatchStatement", "false");
    public void execute() throws BuildException    {        if (driver == null)        {            throw new BuildException("Driver attribute must be set!", location);        }        if (userId == null)        {            throw new BuildException("User Id attribute must be set!", location);        }        if (password == null)        {            throw new BuildException("Password attribute must be set!", location);        }        if (url == null)        {            throw new BuildException("Url attribute must be set!", location);        }        if (steps.size() == 0)        {            throw new BuildException("Must declare at least one step in a <dbunit> task!");        }        if (useQualifiedTableNames)        {            System.setProperty("dbunit.qualified.table.names", "true");        }        if (supportBatchStatement)        {            System.setProperty("dbunit.database.supportBatchStatement", "true");        }        Driver driverInstance = null;        try        {            Class dc;            if (classpath != null)            {                log("Loading " + driver + " using AntClassLoader with classpath " + classpath,                        Project.MSG_VERBOSE);                loader = new AntClassLoader(project, classpath);                dc = loader.loadClass(driver);            }            else            {                log("Loading " + driver + " using system loader.", Project.MSG_VERBOSE);                dc = Class.forName(driver);            }            driverInstance = (Driver)dc.newInstance();        }        catch (ClassNotFoundException e)        {            throw new BuildException("Class Not Found: JDBC driver "                    + driver + " could not be loaded", e, location);        }        catch (IllegalAccessException e)        {            throw new BuildException("Illegal Access: JDBC driver "                    + driver + " could not be loaded", location);        }        catch (InstantiationException e)        {            throw new BuildException("Instantiation Exception: JDBC driver "                    + driver + " could not be loaded", location);        }        try        {            log("connecting to " + url, Project.MSG_VERBOSE);            Properties info = new Properties();            info.put("user", userId);            info.put("password", password);            conn = driverInstance.connect(url, info);            if (conn == null)            {                // Driver doesn't understand the URL                throw new SQLException("No suitable Driver for " + url);            }            conn.setAutoCommit(true);            Iterator stepIter = steps.listIterator();            while (stepIter.hasNext())            {                DbUnitTaskStep step = (DbUnitTaskStep)stepIter.next();                IDatabaseConnection connection = new DatabaseConnection(conn, schema);                log(step.getLogMessage(), Project.MSG_INFO);                step.execute(connection);            }        }        catch (DatabaseUnitException e)        {            throw new BuildException(e, location);        }        catch (SQLException e)        {            throw new BuildException(e, location);        }        finally        {            try            {                if (conn != null)                {                    conn.close();                }            }            catch (SQLException e)            {            }        }    }