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

SQL Anywhere 11.0.0 » SQL Anywhere Server - Programming » SQL Anywhere Data Access APIs » SQL Anywhere JDBC API » Using JDBC to access data


Preparing for the examples

Sample code

The code fragments in this section are taken from the complete class in samples-dir\SQLAnywhere\JDBC\

To install the JDBCExample class

  1. Compile the source code.

  2. Using Interactive SQL, connect to the sample database as the DBA.

  3. Install the JDBCExample.class file into the sample database by executing the following statement in Interactive SQL (samples-dir represents the SQL Anywhere samples directory):

    FROM FILE 'samples-dir\SQLAnywhere\JDBC\JDBCExample.class'

    You can also install the class using Sybase Central. While connected to the sample database, open the Java subfolder under External Environments and choose File » New » Java Class. Follow the instructions in the wizard.