throw new SQLException("No suitable Driver for " + url);
}
conn.setAutoCommit(true);
IDatabaseConnection connection = new DatabaseConnection(conn, schema);
DatabaseConfig config = connection.getConfig();
config.setFeature(DatabaseConfig.FEATURE_BATCHED_STATEMENTS, supportBatchStatement);
config.setFeature(DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMES, useQualifiedTableNames);
config.setFeature(DatabaseConfig.FEATURE_DATATYPE_WARNING, datatypeWarning);
config.setProperty(DatabaseConfig.PROPERTY_ESCAPE_PATTERN, escapePattern);
config.setProperty(DatabaseConfig.PROPERTY_RESULTSET_TABLE_FACTORY,
new ForwardOnlyResultSetTableFactory());
// Setup data type factory
try
{
IDataTypeFactory dataTypeFactory = (IDataTypeFactory)Class.forName(
this.dataTypeFactory).newInstance();
config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, dataTypeFactory);
}
catch (ClassNotFoundException e)
{
throw new BuildException("Class Not Found: DataType factory "
+ driver + " could not be loaded", e, location);