Order the Book

coreservlets
Class DriverUtilities

java.lang.Object
  |
  +--coreservlets.DriverUtilities

public class DriverUtilities
extends Object

Some simple utilities for building Oracle and Sybase JDBC connections. This is not general-purpose code -- it is specific to my local setup.

Taken from Core Servlets and JavaServer Pages from Prentice Hall and Sun Microsystems Press, http://www.coreservlets.com/. © 2000 Marty Hall; may be freely used or adapted.


Field Summary
static int ORACLE
           
static int SYBASE
           
static int UNKNOWN
           
 
Constructor Summary
DriverUtilities()
           
 
Method Summary
static String getDriver(int vendor)
          Get the fully qualified name of a driver.
static int getVendor(String vendorName)
          Map name to int value.
static String makeURL(String host, String dbName, int vendor)
          Build a URL in the format needed by the Oracle and Sybase drivers I am using.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORACLE

public static final int ORACLE

SYBASE

public static final int SYBASE

UNKNOWN

public static final int UNKNOWN
Constructor Detail

DriverUtilities

public DriverUtilities()
Method Detail

makeURL

public static String makeURL(String host,
                             String dbName,
                             int vendor)
Build a URL in the format needed by the Oracle and Sybase drivers I am using.

getDriver

public static String getDriver(int vendor)
Get the fully qualified name of a driver.

getVendor

public static int getVendor(String vendorName)
Map name to int value.

Order the Book

Order
CSAJSP @ amazon.com

Return to Top-Level Source Code Archive