This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Update Pattern?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Update Pattern??" Watch "Update Pattern??" New topic
Author

Update Pattern??

Jenna Thomas
Greenhorn

Joined: Oct 03, 2005
Posts: 27
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


Cheers!
Jenn SCJP1.5
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Update Pattern??
 
Similar Threads
Which Security Framework should be used?
I'm a new member, need help from expert opinions
FilteredRowSet
Data Access Layer Best Practices
Need a disconnected resultset