Nicholas Negulescu wrote:
[...]
My problem is that I'm trying to figure out how to load it from an SQL
file. Sure, I can do it on the command line like so:
java -Djdbc.drivers=org.apache.derby.jdbc.EmbeddedDriver
org.apache.derby.tools.ij <bogusdb.sql>
but I was wondering which tool/class to use when you've alread got the
driver loaded and you're executing withing the VM already.
[...]
You might want to check out the new ij method called runScript(...),
which was added in Derby 10.2 (soon to be released).
JavaDoc (for 10.2 runScript method) is here:
http://db.apache.org/derby/docs/10.2/publishedapi/jdbc3/org/apache/derby/tools/ij.html#runScript(java.sql.Connection,%20java.io.InputStream,%20java.lang.String,%20java.io.OutputStream,%20java.lang.String)
--
John