Hi all,
  Do you know if there's a way to enumerate table names in a database?

I figure, I can try the follwoing assuming an Connection (conn) object has
been successfully obtained.

========================================
String catalog=null,
         schemaPattern=null,
         tableNamePattern="%",
         types=null;

DatabaseMetaData dbMD = conn.getMetaData();
ResultSet rs = getTables(catalog,
                         schemaPattern,
                         tableNamePattern,
                         types);

==========================================

Will the above work?  If so, is there a better way to achieve the same goal?

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to