All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.ibm.as400.access.AS400JDBCDriver
The AS400JDBCDriver class is a JDBC 2.0 driver that accesses DB2 for OS/400 databases.
To use this driver, the application or caller must register the driver with the JDBC DriverManager. This class also registers itself automatically when it is loaded.
After registering the driver, applications make connection requests to the DriverManager, which dispatches them to the appropriate driver. This driver accepts connection requests for databases specified by the URLs that match the following syntax:
jdbc:as400://server-name/default-schema;properties
The driver uses the specified server name to connect to a corresponding AS/400 server. If a server name is not specified, then the user will be prompted.
The default schema is optional and the driver uses it to resolve unqualified names in SQL statements. If no default schema is set, then the driver resolves unqualified names based on the naming convention for the connection. If SQL naming is being used, and no default schema is set, then the driver resolves unqualified names using the schema with the same name as the user. If system naming is being used, and no default schema is set, then the driver resolves unqualified names using the server job's library list. See JDBC properties for more details on how to set the naming convention and library list.
Several properties can optionally be set within the URL. They are separated by semicolons and are in the form:
name1=value1;name2=value2;...See JDBC properties for a complete list of properties supported by this driver.
The following example URL specifies a connection to the database on server mysystem.helloworld.com with mylibrary as the default schema. The connection will use the system naming convention and return full error messages:
jdbc:as400://mysystem.helloworld.com/mylibrary;naming=system;errors=full
public AS400JDBCDriver()
public boolean acceptsURL(String url) throws SQLException
public Connection connect(String url, Properties info) throws SQLException
public int getMajorVersion()
public int getMinorVersion()
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
public boolean jdbcCompliant()
public String toString()
All Packages Class Hierarchy This Package Previous Next Index