db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Nabbefeld <Peter.Nabbef...@gmx.de>
Subject Automatic database and schema creation
Date Fri, 22 Apr 2005 11:30:17 GMT

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 (10.0.2.1).

Kind regards

Peter Nabbefeld




Mime
View raw message