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 Geting tables names from data base file 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 "Geting tables names from data base file" Watch "Geting tables names from data base file" New topic
Author

Geting tables names from data base file

nabi bux
Ranch Hand

Joined: Mar 14, 2005
Posts: 73
Hi
every body I have a Database in acess i want to get the name of tables in Data base how i get them please help.
thanks
stu derby
Ranch Hand

Joined: Dec 15, 2005
Posts: 333
http://java.sun.com/j2se/1.5.0/docs/api/java/sql/DatabaseMetaData.html
nabi bux
Ranch Hand

Joined: Mar 14, 2005
Posts: 73
Thanks for reply
But If give me some code please
thanks again
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

Nabi,
Take a look at the getTables() method. You can pass null for most of the parameters if you want to get all the tables.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1082

a little more help you can find at

http://www.coderanch.com/t/302067/JDBC/java/table-names

Shailesh


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Geting tables names from data base file
 
jQuery in Action, 3rd edition