CF Snippets

H2 Datasource Configuration

Connect to an H2 flat-file database from CFML by placing this datasource struct configuration in your Application.cfc.

this.datasources["h2"] = {
  class: "org.h2.Driver"
  , bundleName: "org.h2"
  , connectionString: "jdbc:h2:#expandPath( '/db/h2db' )#;MODE=MySQL;"
};