JDBC-DB2: cannot get primary/foreign keys info from metadata 
Author Message
 JDBC-DB2: cannot get primary/foreign keys info from metadata

I am running DB2 UDB 6.1 under Redhat Linux 6.2

I could make connection to DB2, obtain the metadata, and read all
column data of all tables in the database.  However, to see the cross
references between the tables, I tried to execute
DatabaseMetadata.getCrossReference(), and received an EMPTY result
set.  Same empty results with getPrimaryKeys(), getExportedKeys(), and
getImportedKeys().

Is this the right thing to do to see the relations between tables?
Did I do anything wrong or the DB2 JDBC driver does not work properly?
 Any help would be very much appreciated.  Thanks :-)) Vien



Mon, 10 May 2004 07:01:51 GMT
 JDBC-DB2: cannot get primary/foreign keys info from metadata

Vien, these methods you mentioned should work. Can you please post an
example?

Dirk



Thu, 13 May 2004 07:53:35 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. foreign key w/o foreign/primary key

2. Getting Primary * Foreign Key Information?

3. getting primary and foreign using jdbc

4. ?? Getting info on foreign keys from sys*

5. Getting Primary Key Info. for a table

6. Urgent: system is getting hanged while getting metadata from oracle using jdbc

7. oracle jdbc driver getting primary keys

8. Foreign Key as subset of Primary Key

9. Identification of a primary key/foreign key

10. One FOREIGN KEY refrences a Table with two Primary Keys

11. Copying Primary Key to Foreign Key

12. Changing Primary Key Values when foreign key constraints exist


 
Powered by phpBB® Forum Software