ASA Programming Guide
JDBC Programming
Establishing JDBC connections
Establishing a connection from a server-side JDBC class
The following is the source code for the example. You can find the source code in the InternalConnect method of Samples\ASA\Java\JDBCExamples.java under your SQL Anywhere directory:
public static void InternalConnect() { try { conn = DriverManager.getConnection("jdbc:default:connection"); System.out.println("Hello World"); } catch ( Exception e ) { System.out.println("Error: " + e.getMessage()); e.printStackTrace(); } } }