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.
I hope this helps you out,
Corey