Programatically Create an Apache Derby Database in Adobe Coldfusion
CFML, Coldfusion, and Derby
With Lucee you can add a datasource for the H2 embedded database and if the database doesnt exist it will be created automatically. This can be handy if you have some automated setup routine for your application.
However, if you want to use an embedded Apache Derby database with Adobe Coldfusion the database must exist or it will throw an error. You can use the Java JDBC driver for Apache Derby to create the database if it does not exist.
This opens a connection with the Apache Derby JDBC driver and passed create=true to create the database.