• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem accessing MetaData with DB2

 
Ankit C
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using
COM.ibm.db2.jdbc.app.DB2Driver for my application.
I am having problem when I try to access Database MetaData. When I call metaData.getTables() I get an empty ResultSet and when I call metaData.getSchemas() I get SQLException.
The java.sql.DatabaseMetaData interface documentation clearly states that
"An SQLException will be thrown if a driver does not support a meta data method. In the case of methods that return a ResultSet, either a ResultSet (which may be empty) is returned or a SQLException is thrown."
Is there any Driver available which supports these (getTables and getSchemas) methods.
Thanks in advance
Ankit
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
if I remember right, DB2 ships with 2 different jdbc drivers, with the older java1.1 compatible being default.
You can activate the newer java1.2 compatible driver with running usejdbc2.bat, which is in SQLLIB\java12 directory.
Not sure, correct me if I am wrong, hope it helps.
Axel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic