ij.dataSource

Attention: Derby Version 10.2 includes JDBC 4.0 functionality based on a pre-release of Java SE 6. When you use Derby with a Java SE 6 virtual machine, Derby will use its JDBC 3.0 drivers, just as with 1.4 and 1.5 virtual machines. JDBC 4.0 is available only to developers who download Java SE 6 and use it to build in support for JDBC 4.0. The Release Notes explain how to build the JDBC 4.0 functionality with Derby Version 10.2. A follow-on Derby release will include JDBC 4.0 functionality based on the final JDBC 4.0 specification once Java SE 6 becomes generally available.

Function

The ij.dataSource property specifies the datasource to be used to access the database. When specifying a datasource, Derby does not use the DriverManager mechanism to establish connections.

Syntax

To establish a connection using ij.dataSource, you need to set the ij.dataSource.databaseName and to create the database specify the ij.dataSource.createDatabase property as well.
ij.dataSource=dataSourcename ij.dataSource.databaseName=databasename [ij.dataSource.createDatabase=create]

Example


#
# If your application runs on JDK 1.6 or higher, then you should
# specify the JDBC4 variant of this DataSource:
# org.apache.derby.jdbc.EmbeddedDataSource40.
#
java -Dij.dataSource=org.apache.derby.jdbc.EmbeddedDataSource
-Dij.dataSource.databaseName=sample -Dij.dataSource.createDatabase=create
  org.apache.derby.tools.ij
ij version 10.2
CONNECTION0*
* = current connection
For more information about DataSources, refer to the JDBC documentation and "Using Derby as a J2EE Resource Manager" in the Derby Developer's Guide.
Related reference
ij.connection.connectionName
ij.database
ij.driver
ij.maximumDisplayWidth
ij.outfile
ij.password
ij.protocol
ij.protocol.protocolName
ij.showErrorCode
ij.URLCheck
ij.user
derby.ui.codeset