It's not a secret anymore!
The moose likes JDBC and Relational Databases and the fly likes Update Statement Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Update Statement Problem" Watch "Update Statement Problem" New topic

Update Statement Problem

omar salem
Ranch Hand

Joined: Aug 22, 2006
Posts: 34
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.

Have a sip of Java !!!
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Do any rows in your table match your where condition?

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Raj Chila
Ranch Hand

Joined: Mar 18, 2004
Posts: 128

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.
I agree. Here's the link:
subject: Update Statement Problem
jQuery in Action, 3rd edition