java.sql.Driver.getPropertyInfo

To get the DriverPropertyInfo object, request the JDBC driver from the driver manager:

java.sql.DriverManager.getDriver("jdbc:derby:").
    getPropertyInfo(URL, Prop)

Do not request it from org.apache.derby.jdbc.EmbeddedDriver, which is only an intermediary class that loads the actual driver.

This method might return a DriverPropertyInfo object. In a Derby system, it consists of an array of database connection URL attributes. The most useful attribute is databaseName=nameofDatabase, which means that the object consists of a list of booted databases in the current system.

For example, if a Derby system has the databases toursDB and flightsDB in its system directory, all the databases in the system are set to boot automatically, and a user has also connected to a database A:/dbs/tours94, the array returned from getPropertyInfo contains one object corresponding to the databaseName attribute. The choices field of the DriverPropertyInfo object will contain an array of three Strings with the values toursDB, flightsDB, and A:/dbs/tours94. Note that this object is returned only if the proposed connection objects do not already include a database name (in any form) or include the shutdown attribute with the value true.

For more information about java.sql.Driver.getPropertyInfo, see "Offering Connection Choices to the User" in Chapter 8 of the Derby Developer's Guide.

Related concepts
Core JDBC java.sql Classes, Interfaces, and Methods
Related reference
java.sql.Driver
java.sql.DriverManager.getConnection
java.sql.Connection
java.sql.DatabaseMetaData
java.sql.Statement
java.sql.PreparedStatement
java.sql.CallableStatement
java.sql.ResultSet
java.sql.ResultSetMetaData
java.sql.SQLException
java.sql.SQLWarning
Mapping of java.sql.Types to SQL types
java.sql.Blob and java.sql.Clob
java.sql.Connection
java.sql.ResultSet
java.sql.Statement
java.sql.PreparedStatement
java.sql.CallableStatement
java.sql.DatabaseMetaData
java.sql.ResultSetMetaData
java.sql.BatchUpdateException
JDBC Package for Connected Device Configuration/Foundation Profile (JSR169)
JDBC 3.0-only features
java.sql.Connection
java.sql.DatabaseMetaData
java.sql.ParameterMetaData
java.sql.PreparedStatement
java.sql.Savepoint
java.sql.Statement
JDBC escape syntax