If you wish to access database system tables (database metadata) from a JDBC application, you must add a set of jConnect system objects to your database. Asajdbc shares the same stored procedures for database metadata support with jConnect. These procedures are installed to all databases by default. A dbinit switch “-I” prevents this installation.
For information about adding the jConnect system objects to a database, see “Using the Sybase jConnect JDBC driver”.
The following complete Java application is a command-line application that connects to a running database, prints a set of information to your command line, and terminates.
Establishing a connection is the first step any JDBC application must take when working with database data.
This example illustrates an external connection, which is a regular client/server connection. For information on how to create an internal connection, from Java classes running inside the database server, see “Establishing a connection from a server-side JDBC class”.