Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Using wide table support for Adaptive Server version 12.5
and later [Table of Contents] Using cursors
with result sets

Programmer's Reference jConnect for JDBC 6.0

[-] Chapter 2 Programming Information
[-] Working with databases
[-] Accessing database metadata

Accessing database metadata

To support JDBC DatabaseMetaData methods, Sybase provides a set of stored procedures that jConnect can call for metadata about a database. These stored procedures must be installed on the server for the JDBC metadata methods to work.

If the stored procedures for providing metadata are not already installed in a Sybase server, you can install them using stored procedure scripts provided with jConnect:

The most recent version of these scripts is compatible with all versions of jConnect.

See the Sybase jConnect for JDBC Installation Guide and Release Bulletin for complete instructions on installing stored procedures.

In addition, to use the metadata methods, you must set the USE_METADATA connection property to "true" (its default value) when you establish a connection.

You cannot get metadata about temporary tables in a database.

The DatabaseMetaData.getPrimaryKeys method finds primary keys declared in a table definition (CREATE TABLE) or with alter table (ALTER TABLE ADD CONSTRAINT). It does not find keys defined using sp_primarykey.

Server-side metadata installation

Metadata support can be implemented in either the client (ODBC, JDBC) or in the data source (server stored procedures). jConnect provides metadata support on the server, which results in the following benefits:


Using wide table support for Adaptive Server version 12.5
and later [Table of Contents] Using cursors
with result sets