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 key here is the use of the DatabaseMetaData object. That object allows you to find out all sorts of information about a database, including the database name, type, driver, table names, column names, types, etc. A lot of information is available. The following code (which I haven't yet tested ) should be pretty close to what you need to get your table names and column names.
As long as the DB is a relational DB, what corey posted should have got you all the tables in the DB. When you said it's not like mySQL, are you saying it's not a relational DB such as Oracle, DB2, MSAccess atc.? ------------------ Bosun SCJP for the Java� 2 Platform
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Joined: Aug 17, 2001
I am connecting into the DB blindly and not very familiar with this style of DB I use a Multi-Valued DB. Thanks Corey I will give this a shot and let you know.
Originally posted by Bosun Bello: As long as the DB is a relational DB, what corey posted should have got you all the tables in the DB. When you said it's not like mySQL, are you saying it's not a relational DB such as Oracle, DB2, MSAccess atc.?