I am connecting the mdb file using JdbcOdbcDriver. I need get the
metadata information. I can get the table name and column name its
datatype etc. however am not able to get the column constraints like
NOT NULL constraint, CHECK constraints etc. Is it possible to get it
via querying any table to jdbc API
> I am connecting the mdb file using JdbcOdbcDriver. I need get the
> metadata information. I can get the table name and column name its
> datatype etc. however am not able to get the column constraints like
> NOT NULL constraint, CHECK constraints etc. Is it possible to get it
> via querying any table to jdbc API
JDBC does not provide a way to access all column constraints. You will need to use
methods native to your SQL DBMS.
JDBC's java.sql.DatabaseMetaData does provide partial access to constraints:
+ NOT NULL - use the getColumns() method and look at the NULLABLE and IS_NULLABLE
columns in the resultset from getColumns().
+ PRIMARY KEY - use the getPrimaryKeys() method.
+ FOREIGN KEY - use getCrossReference(), getImportedKeys() and/or getExportedKeys().
+ UNIQUE - you could try getIndexInfo() and look at resultset rows with the NON_UNIQUE
column.

Signature
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS (http://www.firstsql.com)