ASA Programming Guide
Using Java in the Database
Introduction
Some of the examples in this chapter require you to add the JDBCExamples class to the sample database.
Setting up the Java examples involves two steps:
Java-enable the sample database. Adaptive Server Anywhere databases are not Java-enabled by default.
Add the JDBCExamples class to the database.
To Java-enable the sample database
Start Sybase Central and connect to the sample database (ASA 9.0 Sample ODBC data source). An asademo9 database server appears with an asademo database.
In the left pane of Sybase Central, right click the asademo database and choose Upgrade Database from the popup menu. The Upgrade a Database wizard appears.
Follow the instructions in the Upgrade a Database wizard. Choose the option to Install Java Support with a JDK version of 1.3.
Restart the sample database.
When the Upgrade a Database wizard has completed, disconnect and ensure that the sample database is shut down. The database must be shut down and restarted before Java support can be used.
Confirm that Java support has been added:
From Sybase Central, connect to the sample database.
In the left pane of Sybase Central, right click the asademo database and choose Properties from the popup menu.
Confirm that Java JDK version is set to 1.3.
To add the JDBCExamples class to the sample database
Start Sybase Central and connect to the sample database (ASA 9.0 Sample ODBC data source). An asademo9 database server appears with an asademo database.
In the left pane of Sybase Central, open the Java Objects folder.
Right-click the right pane and choose New
Click Browse and locate JDBCExamples.class in the Samples\ASA\Java subdirectory of your SQL Anywhere installation.
Click OK and click Finish to complete the installation.