commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John E. Conlon" <jcon...@verticon.com>
Subject [SQL] HSQL Drop table
Date Sat, 06 Mar 2004 20:16:50 GMT
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.

thanks,
John



---------------------------------------------------------------------
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