Contents Index Using the jConnect JDBC driver Installing jConnect system objects into a database

ASA Programming Guide
  JDBC Programming
    Using the jConnect JDBC driver

The jConnect driver files


The jConnect JDBC driver is installed into a set of directories under the Sybase\Shared directory. Two versions of jConnect are supplied:

Examples in this chapter use jConnect 5.5. Users of jConnect 4.5 must make appropriate substitutions.

Setting the CLASSPATH for jConnect 

For your application to use jConnect, the jConnect classes must be in your classpath at compile time and run time, so the Java compiler and Java runtime can locate the necessary files.

The following command adds the jConnect 5.5 driver to an existing CLASSPATH environment variable where path is your Sybase\Shared directory.

set classpath=%classpath%;path\jConnect-5_5\classes\jconn2.jar

The following command adds the jConnect 4.5 driver to an existing CLASSPATH environment variable:

set classpath=%classpath%;path\jConnect-4_5\classes
Importing the jConnect classes 

The classes in jConnect are all in the com.sybase package.

If you are using jConnect 5.5, your application must access classes in com.sybase.jdbc2.jdbc. You must import these classes at the beginning of each source file:

import com.sybase.jdbc2.jdbc.*

If you are using jConnect 4.5, the classes are in com.sybase.jdbc. You must import these classes at the beginning of each source file:

import com.sybase. jdbc.*

Contents Index Using the jConnect JDBC driver Installing jConnect system objects into a database