Chapter 28 Using Connection Management


Database connectivity

This section contains details on connecting Jaguar components to specific third-tier databases, including:

Sybase Adaptive Server Anywhere

On most platforms, Jaguar includes a copy of Sybase Adaptive Server Anywhere (formerly called Sybase SQL Anywhere). On these platforms, the Jaguar sample components use a preconfigured Adaptive Server Anywhere database and Adaptive Server Anywhere ODBC data source. The sample C++ components connect using an ODBC connection cache. The sample Java components connect using the JDBC-ODBC bridge driver. View the predefined sample connection caches in Jaguar Manager for examples of configuring a cache to connect to Adaptive Server Anywhere.

The JDBC-ODBC bridge driver is included with JavaSoft's JDK 1.1 installation.

Sybase Adaptive Server Enterprise and gateways

You can connect components to Sybase Adaptive Server Enterprise, OmniConnect™, or DirectConnect™ using ODBC, JDBC, or Sybase Open Client Client-Library.

To use ODBC, you must install the Sybase Adaptive Server ODBC driver, which is currently available for Windows NT and Sun Solaris. For another platform, see the Jaguar CTS Installation Guide and Release Bulletin for information on ODBC driver availability. Jaguar includes ODBC drivers on Windows and NT, as described below:

To use the Sybase jConnect™ JDBC driver, use Jaguar Manager to define a JDBC connection cache that connects using the JDK-1.1 implementation of the driver. Jaguar includes a full jConnect installation in the jConnect subdirectory. The jConnect classes are expanded under the html/classes subdirectory. See the jConnect documentation for details on using jConnect, including:

The jConnect documentation is available on the Sybase Web page .

Oracle databases

You can connect to Oracle databases using JDBC, ODBC, or the Oracle Call Interface (OCI). Jaguar does not include JDBC or ODBC drivers for Oracle or the OCI libraries. Jaguar provides dedicated support for Oracle's proprietary C interface, OCI versions 7 and 8. OCI connections that are cached by Jaguar are used like any other OCI connection, except that Jaguar opens the connection for you.

Oracle connection caches that use ODBC or JDBC can be created as for any other ODBC or JDBC cache, as described in "Other databases". "Using OCI 7.x connection caches" describes how to use an OCI cache in a C or C++ component.

Other databases

Jaguar components can connect to any database for which an ODBC or JDBC driver is available. If only an ODBC driver is available, you may be able to use the JDBC-ODBC bridge driver to achieve Java connectivity (this driver is included with JavaSoft JDK 1.1 and later installations). Contact your database vendor for information on JDBC or ODBC driver availability.

To achieve ODBC connectivity, you need to install the appropriate driver, configure a data source that uses the ODBC driver to connect to the target database, then define a Jaguar connection cache that uses that data source. See the Jaguar CTS System Administration Guide for information on defining connection caches.

To achieve JDBC connectivity, you need to install the appropriate JDBC driver, then define a Jaguar connection cache that uses that driver to connect to the target server. See the Jaguar CTS System Administration Guide for information on defining connection caches. When you run the server, you must include the path to the driver's class file in your system's CLASSPATH setting. Many drivers require further configuration. For example, you may have to install stored procedures on each server that you intend to connect to. See your JDBC driver documentation for further configuration instructions.

Note   Most JDBC drivers provide standalone test utility applications (or at least sample applications) that can be used to verify that the driver and datasources are correctly configured. Verify connectivity with a standalone application before configuring Jaguar to use a new driver and datasource combination.

 


Copyright © 2000 Sybase, Inc. All rights reserved.