This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes how to access names of different databases Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "how to access names of different databases" Watch "how to access names of different databases" New topic
Author

how to access names of different databases

amit daundkar
Ranch Hand

Joined: Jan 24, 2009
Posts: 47
hi all,
i use MySQL database. suppose i have created multiple databases with create database command.
i can access name s of the tables in a particular database. but i want to access the names of different databases that i have created.
i dont understand how to do that.

please guide.
thank you.
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
That's what the DatabaseMetaData class is there for. You can obtain an instance of it through Connection.getMetaData(). The getCatalogs and getSchemas methods will provide you with lots of information.
 
Have you checked out Aspose?
 
subject: how to access names of different databases
 
It's not a secret anymore!