IDatabaseConnection connection = new DatabaseConnection(DriverManager.getConnection(provider.getUrl(), username, password));
DatabaseConfig config = connection.getConfig();
if (provider.getUrl().startsWith("jdbc:h2")) {
config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new H2DataTypeFactory());
} else if (provider.getUrl().startsWith("jdbc:hsql")) {
config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new HsqldbDataTypeFactory());
} else if (provider.getUrl().startsWith("jdbc:mysql")) {
config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new MySqlDataTypeFactory());
}
FlatXmlDataSetBuilder builder = new FlatXmlDataSetBuilder();