aspose file tools
The moose likes JDBC and the fly likes DatabaseMetaData and Oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "DatabaseMetaData and Oracle" Watch "DatabaseMetaData and Oracle" New topic
Author

DatabaseMetaData and Oracle

Rik Sweeney
Ranch Hand

Joined: Sep 04, 2001
Posts: 36
Hi,

I'm using the DatabaseMetaData to list all the tables available in a schema for Oracle. The problem is that I don't know what schema the user is connected to so I cannot pass in the schema name

e.g.



The schemaString will be blank usually so I won't get any tables back, if I change this to



then I get back *everything* which isn't too helpful to the user. Basically I'm wondering if there is a way to determine the default schema for the current connection?

Thanks

Richard
Maximilian Xavier Stocker
Ranch Hand

Joined: Sep 20, 2005
Posts: 381
Did you try the method getCatalog of() of java.sql.Connection ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DatabaseMetaData and Oracle
 
Similar Threads
getTables in DatabaseMetadata not giving proper results
Unexpected tables in list
Columns on JTable
retrieve all the tables from a database
dynamically finding the tables in a database