File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getTables schema question

 
Paul Bergin
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
hope you can help me out.
I have written a tool which can connect to different databases via JDBC or ODBC, it has been working perfectly till now.
The problem I am having is retrieving tables for a specific schema/view.
Up to now I have been using the userid (which the user connects to the db with) as the schema name,
DatabaseMetaData.getTables(catalog, schema, tableNamePattern, types)
but I now have client who uses the ODBC name to identify the schema, so my question is,
Which is more commonly used to identify a schema, userid or ODBC name.
AND
If I was to get get a list of the schemas with
DatabaseMetaData.getSchemas()
and compare user name and odbc name to the list of schemas, if both appeared in the scheam list, which would normally take priority?
Regards
Paul
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic