db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Van Couvering <da...@vancouvering.com>
Subject Re: Multiple SQL statements in a script fail using JDBC
Date Wed, 25 May 2005 15:52:40 GMT
Note that you can invoke ij from a Java app, just call 
org.apache.derby.tools.ij.Main with your list of arguments.


Bernt M. Johnsen wrote:

>>>>>>>>>>>>>Andrew wrote (2005-05-24 11:23:07):
>>How can I give Derby a list of SQL statements from a script and it will 
>>execute them, other than me parsing out SQL statement one prior to 
>>calling the statement.execute().
> From JDBC you can't. You have either to execute the statements one by
> one, or use the batch, but still tou have to add the statements one by
> one to the batch (statement.addBatch() and statement.executeBatch()).
>>I would like the database creation to be embedded into this Java 
>>application.  Is there a utility to execute these scripts using a Java 
>>Connection Object?
> Not through a connection object. You can, however, consider using the
> tool ij to execute a script of SQL statements.
>>Also, what is the Derby SQL term used to COMMIT a transaction, it is not 
> In JDBC: connection.commit();
> In ij: COMMIT;

View raw message