Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes Newbie: How to implement to tables with same structure 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 "Newbie: How to implement to tables with same structure" Watch "Newbie: How to implement to tables with same structure" New topic
Author

Newbie: How to implement to tables with same structure

Paul Duer
Ranch Hand

Joined: Oct 10, 2002
Posts: 98
Hello all,
I have a quick and dirty question that I am sure is easily accessible.
I have two tables that are exactly the same in sturcture, but each holds different entries for a combo box on a JSP.
How do I write one main class that can support pulling data from either table?
I had considered a Abstract Factory, so that I could just create either/or from one class, but I am not sure.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Newbie: How to implement to tables with same structure