Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - Programming » SQL Anywhere JDBC API

Supplying a URL to the driver Next Page

Using the jConnect JDBC driver


SQL Anywhere supports two versions of jConnect: jConnect 5.5 and jConnect 6.0.5. The jConnect driver is available as a separate download from [external link] http://www.sybase.com/products/informationmanagement/softwaredeveloperkit/jconnect. Documentation for jConnect can also be found on the same page.

If you want to use JDBC from an applet, you must use the jConnect JDBC driver to connect to SQL Anywhere databases.

The jConnect driver files

SQL Anywhere supports the following versions of jConnect:

Note

For the purposes of this documentation, all of the explanations and code samples provided assume that you are developing JDK 1.5 applications, and using the jConnect 6.0.5 driver.

Setting the class path for jConnect

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

The following command adds the jConnect 6.0.5 driver to an existing CLASSPATH environment variable where path is your SQL Anywhere installation directory.

set classpath=%classpath%;path\jConnect-6_0\classes\jconn3.jar
Importing the jConnect classes

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

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

import com.sybase.jdbc3.jdbc.*

Installing jConnect system objects into a database
Loading the jConnect driver
Supplying a URL to the driver