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

SQL Anywhere 11.0.1 (Français) » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere JDBC driver » 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 classpath 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).