Explicitly Creating the InterClient Driver
Go Up to About InterClient Drivers
When writing a client program, you can interact either with the DriverManager class or with a database driver object directly. To reference an InterClient driver directly, you must use the java.sql.Driver class to explicitly create an instance of the driver. This instance is in addition to the anonymous one that's created automatically when the InterClient driver is loaded:
java.sql.Driver driver = new interbase.interclient.Driver();
Now you can reference the driver classes and methods with driver.XXX(). If all you need to do is connect to the database and execute SQL statements, you do not need to create a driver object explicitly; the DriverManager handles everything for you. However, there are a few cases when you need to reference the driver by name. These include:
- Getting information about the driver itself, such as a version number.
- Tailoring a driver for debugging purposes. For more information, see Debugging your Application.
The DriverManager sees a driver as only one of many standard JDBC drivers that can be loaded. If you need to create a connection to another type of database in the future, you need only to load the new driver with forName() or declare another driver explicitly with
java.sql.Driver driver = new XXX.Driver