This section describes how to run the external connection example
Creating and executing the external connection example application
From a system command prompt, change to the Sybase IQ installation directory.
Change to the ASIQ-12_7/java subdirectory
Ensure that your CLASSPATH environment variable includes the current directory (.) and the imported zip files. For example, from a command prompt (the following should be entered all on one line):
set classpath=..\java\jdbcdrv.zip;.;..\java\asajdbc.zip;asademo.jar
The default zip file name for Java is classes.zip. For classes in any file named classes.zip, you only need the directory name in the CLASSPATH variable, not the zip-file name itself. For classes in files with other names, you must supply the zip file name.
You need the current directory in the CLASSPATH to run the example.
Ensure the database is loaded onto a database server running TCP/IP. You can start such a server on your local machine using the following command (from the ASIQ-12_7/samples/asa subdirectory):
On UNIX: start_asiq .../asiqdemo
On Windows: start_asiq ...\asiqdemo
Enter the following at the command prompt to run the example:
java JDBCExamples
If you wish to try this against a server running on another
machine, you must enter the correct name of that machine. The default
is localhost
, which is an alias
for the current machine name.
Confirm that a list of people and products appears at your command prompt.
If the attempt to connect fails, an error message appears instead. Confirm that you have executed all the steps as required. Check that your CLASSPATH is correct. An incorrect CLASSPATH results in a failure to locate a class.
For more information about using jConnect, see “Using the Sybase jConnect JDBC driver”, and see the online documentation for jConnect.