wood burning stoves*
The moose likes JDBC 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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30356
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Geting tables names from data base file