commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "matthew.hawthorne" <ma...@apache.org>
Subject Re: [SQL] HSQL Drop table
Date Sat, 06 Mar 2004 22:14:30 GMT
John E. Conlon wrote:
> Had a problem with the ddls generated for hsqldb. The first time
> creation of tables was encountering problems.  The ddl generated started
> with a 
> 
> drop table <tablename> ;
> 
> declaration. When I ran the ddl for the first time encountered an error
> stating the table did not exist. To get it to work, I changed my local
> copy of the source for the HsqlDbBuilder to override the dropTable
> method of the super class as follows:
> 
>     /**
>      * Outputs the DDL to drop the table
>      */
>     public void dropTable(Table table) throws IOException {
>         print("drop table ");
>         print(table.getName());
>         print(" if exists");
>         printEndOfStatement();
>     }
> 
> Thought someone with change access to the cvs may want to change it if
> it makes sense.


In the current CVS, the ddl task has a "dropTables" attribute which can 
be set to false.
I'm pretty sure this will do what you want.  I use it when I'm creating 
a fresh database.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message