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 » Using the iAnywhere JDBC driver

Using the iAnywhere JDBC driver Next Page

Loading the iAnywhere JDBC driver


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

DriverManager.registerDriver( (Driver)
    Class.forName(
    "ianywhere.ml.jdbcodbc.jdbc3.IDriver").newInstance()
    );

Load the JDBC 2.0 version of the iAnywhere JDBC driver with the following statement:

DriverManager.registerDriver( (Driver)
    Class.forName(
    "ianywhere.ml.jdbcodbc.IDriver").newInstance()
    );

Using the newInstance method works around issues in some browsers.

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 dbjodbc10.dll in the win32 subdirectory of your SQL Anywhere installation; for Unix, the native component is dbjodbc10.so. This component must be in the system path. When deploying applications using this driver, you must also deploy the ODBC driver files.