db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Eric Miller" <jemil...@uchicago.edu>
Subject Re: Automatic database and schema creation
Date Fri, 22 Apr 2005 19:57:10 GMT
I don't know if it's the case that you are already doing this, but, you can 
get better error messages if you set the following driver attribute. It's 
set to false by default. Supposedly, this will be changed when IBM releases 
the source code to the JDBC driver. Any word on when that's going to happen? 
I thought they were supposed to do it a long time ago...


----- Original Message ----- 
From: "Øystein Grøvlen - Sun Norway" <Oystein.Grovlen@Sun.COM>
To: "Derby Discussion" <derby-user@db.apache.org>
Sent: Friday, April 22, 2005 7:04 AM
Subject: Re: Automatic database and schema creation

> Peter Nabbefeld wrote:
>> Hello,
>> I just want to create a database, if it does not yet exist. Database 
>> creation works, schema creation does not. I'm using the following syntax 
>> (in Java):
>>     Statement stmt = con.createStatement();
>>     stmt.execute("CREATE SCHEMA USER");
>> The result is an SQLException with SQLState = 42X01 (Syntax error).
>> What am I doing wrong? Before creation, I'm trying to insert a record. If 
>> an Exception is thrown, I ask for status 42Y07 (Schema does not exist). 
>> Derby is stable version (
> USER is a reserved word.  I think it would be nice if the error message 
> reflected that.
> --
> Øystein

View raw message