aspose file tools
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


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Update Statement Problem" Watch "Update Statement Problem" New topic
Author

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
Bartender

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: http://aspose.com/file-tools
 
subject: Update Statement Problem