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:
sql_server.sql installs stored procedures on pre-12.0 Adaptive Server databases.
sql_server12.sql installs stored procedures on a version 12.0 Adaptive Server database.
sql_server12.5.sql installs stored procedures on Adaptive Server databases of version 12.5 and later.
sql_asa.sql installs stored procedures on an Adaptive Server Anywhere database.
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.
Copyright © 2003. Sybase Inc. All rights reserved. |
![]() |