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

SQL Anywhere 12.0.0 » SQL Anywhere Server - Programming » JDBC support » Using the jConnect JDBC driver

 

Loading the jConnect driver

Before you can use jConnect in your application, load the driver with the following statement:

DriverManager.registerDriver( (Driver)
    Class.forName(
    "com.sybase.jdbc3.jdbc.SybDriver").newInstance()
    );

Using the newInstance method works around issues in some browsers.

  • As the classes are loaded using Class.forName, the package containing the jConnect driver does not have to be imported using import statements.

  • To use jConnect 6.0.5, jconn3.jar must be in your class file path when you run the application. jconn3.jar is located in the classes subdirectory of your jConnect 6.0.5 installation (typically, jConnect-6_0\classes).