• Post Reply Bookmark Topic Watch Topic
  • New Topic

building a Jlist with the use of sql commands

 
Kristof Camelbeke
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have an Ms-Access database which I can connect to using JDBC.
The next step is to show the fields in a Jlist so the user can select them.
What is the best way to achieve this. Use Sql statements within the Jlist?
Thanks for any advice,
Kristof
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my opinion the JList is not the place for it. If you decided later to display using a different component, you would have to move or copy the code. If you decide to go to jsp or servlets, same thing. If you decide to use a different DB, you have to change other areas. I just happen to be a believer in separating the presentation from data access and any business logic.
Just my .02.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!