Hi,

I am not sure whether I understand your question correctly. 
When calling getCreateDDLScript the DBDatabaseDriverMySQL will only provide the 
DLL-Commands for creating a database, and not actually perform the creation of 
the datatabase.
This bahaviour is by design and implemented by all drivers.

If you don't like this I have two options for you:
First, internally the function calls getDDLScript() on the driver 
(DBDatabaseDriverMySQL in your case) with the Database object supplied.
You may call this function yourself for individual tables and views and thus 
only get the DDL for what you want to create.
e.g.
      DBSQLScript script = new DBSQLScript();
        // Create all Tables
      Iterator<DBTable> tables = db.getTables().iterator();
      while (tables.hasNext()) {
          driver.getDDLScript(DBCmdType.CREATE, tables.next(), script);
      }
      script.run(driver, conn, false);

The second option is, to call getCreateDDLScript() and skip the first statement 
of the returned script.

Hope this answer was of help to you.
Best regards

Rainer

Serge Tan Panza wrote:
> re: Empire-db and mysql
> 
> Is there a reason why DBDatabaseDriverMySQL tries to create a database
> when getCreateDDLScript is called  ?
> 
> 
> --
> Tan Panza  Serge

Reply via email to