This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DatabaseMetaData and Oracle

 
Rik Sweeney
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 381
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try the method getCatalog of() of java.sql.Connection ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic