Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Add/Modify db methods in a bean

 
Anthony Smith
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok I am writign an application that has a form on it that you can create or modify a record. Currently, When you bring up a pre-populated form I delete all the info that was listed in the db for where the form datd would be stored than use this new information to repopulate these fields?
I really did not wnat to do a comparison, but do I need to? What if a get some kind of flipped error before the bean finshes, where it dies after I delete the info and before I update the new info?
What should I do? What do most do for modifying stuff?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I usually don't delete what is in the database, and then rewrite everything. If I am doing an update, then I simply do the UPDATE SQL Command. It will over-write what is currently on the database in those fields you are UPDATING.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic