Driver Class

Used to encapsulate basic driver information used to create a database connection.

Constructors

Driver( String vendor, String driver, String protocol )
Driver( java.sql.Driver driver )

Properties

SQLServer
Microsoft SQL Server database driver.
DB2
IBM DB2 database driver.
Sybase
Sybase ASE database driver.
PostgreSQL
PostgreSQL database driver.
Derby
Derby database driver.
SQLite
SQLite database driver.
Access
Microsoft Access database driver.
FrontBase
Informix
Teradata
Pervasive
Pointbase
Daffodil
Firebird
HyperSQL

Public Methods

getProtocol( ) returns String
Returns the url protocol used in the jdbc connection string (e.g. jdbc:sqlserver, jdbc:db2, jdbc:sybase, jdbc:postgresql, jdbc:derby).
getClassName( ) returns String
Returns the class name used to create a new java.sql.Driver (e.g. com.microsoft.sqlserver.jdbc.SQLServerDriver).
getVendor( ) returns String
Returns the name the database/vendor (e.g. SQLServer, DB2, Sybase, etc.)
load( ) returns java.sql.Driver
Used to create a new instance of a java.sql.Driver that corresponds to the driver class specified in the constructor.
equals( Object obj ) returns boolean
Used to compare drivers by class, protocol, and vendor.
objAccepts either a javaxt.sql.Driver or a String representing the driver class, protocol, or vendor.
toString( ) returns String
Returns the name the database/vendor. Same as getVendor()

Static Methods

findDriver( String driverName ) returns Driver
Used to try to find a driver that corresponds to the vendor name, class name, or protocol.