Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Update Pattern??

 
Jenna Thomas
Ranch Hand
Posts: 31
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

I am implementing an Update function that updates 1 or possibly multiple columns in a table. Since the function may update an unknown number of columns, what is the usual way (best practice) to implement this.

For eg, should i create a function that takes a variable number of arguments, or an arraylist of name, value pairs etc. I would like to know whats usually followed for the best modularity and separation of functionality. My application consists of a db layer that implements the sql commands and a business tier where the update function is present and invokes the db layer. I am obviously a newbie to JDBC programming.

thanks in advance
Jennifer
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!