• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Update Statement Problem

 
omar salem
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,

I am developing a simple JDBC application simulating the four basic operations performed on a database. The insert,delete, and retrieve operations are working fine but for the update operation the executeUpdate() method is executed but no effects reflect on the database.The database on which the application is developed is MS-Access. Here is the code i am using :



I would appreciate your help thanking you in advance.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do any rows in your table match your where condition?
 
Raj Chila
Ranch Hand
Posts: 128
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
executeUpdate returns an int suggesting how many rows are updated... loggin that to your output might help.

Also, it might help if you validate and trim your text before setting them on the statement.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic