Class Hierarchy    Previous  Next  Index

Class COM.cloudscape.core.JDBCDriver

java.lang.Object
    |
    +----COM.cloudscape.core.JDBCDriver

public class JDBCDriver
extends java.lang.Object
implements java.sql.Driver
Copyright © 1998-2000, Informix Software, Inc. All rights reserved.

A class that can be used to boot a Cloudscape system.

The correct code to load a Cloudscape system using this driver is (with approriate try/catch blocks):

Class.forName("COM.cloudscape.core.JDBCDriver").newInstance();
When loaded in this way, the class boots the actual JDBC driver indirectly. JavaSoft recommends the Class.ForName method without the .newInstance() method call, but adding the newInstance() guarantees that the Cloudscape system is booted on all platforms.

Any initial error messages are placed in the PrintStream supplied by the DriverManager. If the PrintStream is null error messages are sent to System.err. Once the Cloudscape system has set up an error logging facility (by default to cloudscape.LOG) all subsequent messages are sent to it.

By convention, the class used in the Class.forName() method to boot a JDBC driver implements java.sql.Driver. This class is not the actual JDBC driver that gets registered with the Driver Manager. It proxies requests to the registered Cloudscape JDBC driver.

See Also:
java.sql.DriverManager, getLogStream, java.sql.Driver, java.sql.SQLException

Constructor Index

 o JDBCDriver()
 

Method Index

 o acceptsURL(String)
Accept anything that starts with jdbc:cloudscape
 o connect(String, Properties)
Connect to the URL if possible
 o getMajorVersion()
Returns the driver's major version number.
 o getMinorVersion()
Returns the driver's minor version number.
 o getPropertyInfo(String, Properties)
Returns an array of DriverPropertyInfo objects describing possible properties.
 o jdbcCompliant()
Report whether the Driver is a genuine JDBC COMPLIANT (tm) driver.
 o main(String[])
 

Constructor Detail

 o JDBCDriver
public JDBCDriver()

Method Detail

 o acceptsURL
public boolean acceptsURL(java.lang.String url) throws java.sql.SQLException
          Accept anything that starts with jdbc:cloudscape
Throws:
java.sql.SQLException - if a database-access error occurs.
See Also:
java.sql.Driver
 o connect
public java.sql.Connection connect(java.lang.String url,
                          java.util.Properties info) throws java.sql.SQLException
          Connect to the URL if possible
Throws:
java.sql.SQLException - illegal url or problem with connectiong
See Also:
java.sql.Driver
 o getPropertyInfo
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url,
                                            java.util.Properties info) throws java.sql.SQLException
          Returns an array of DriverPropertyInfo objects describing possible properties.
Throws:
java.sql.SQLException - if a database-access error occurs.
See Also:
java.sql.Driver
 o getMajorVersion
public int getMajorVersion()
          Returns the driver's major version number.
See Also:
java.sql.Driver
 o getMinorVersion
public int getMinorVersion()
          Returns the driver's minor version number.
See Also:
java.sql.Driver
 o jdbcCompliant
public boolean jdbcCompliant()
          Report whether the Driver is a genuine JDBC COMPLIANT (tm) driver.
See Also:
java.sql.Driver
 o main
public static void main(java.lang.String args[])

  Class Hierarchy    Previous  Next  Index