Note that you can invoke ij from a Java app, just call
org.apache.derby.tools.ij.Main with your list of arguments.
David
Bernt M. Johnsen wrote:
Andrew wrote (2005-05-24 11:23:07):
[snip]
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
"COMMIT"
In JDBC: connection.commit();
In ij: COMMIT;