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 iAnywhere JDBC driver


Loading the iAnywhere JDBC driver

Before you can use the iAnywhere JDBC driver in your application, you must load the appropriate driver. Load the iAnywhere JDBC 3.0 driver with the following statement:

DriverManager.registerDriver( (Driver)

Using the newInstance method works around issues in some browsers.

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

  • jodbc.jar must be in your classpath when you run the application.

    set classpath=%classpath%;install-dir\java\jodbc.jar
Required files

The Java component of the iAnywhere JDBC driver is included in the jodbc.jar file installed into the Java subdirectory of your SQL Anywhere installation. For Windows, the native component is dbjodbc11.dll in the bin32 or bin64 subdirectory of your SQL Anywhere installation; for Unix, the native component is This component must be in the system path. When deploying applications using this driver, you must also deploy the ODBC driver files.