aspose file tools*
The moose likes JDBC 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
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.
 
 
subject: Update Statement Problem
 
Similar Threads
Having trouble with executeBatch
doubt in update
ORA-00972: identifier is too long
Inserting date into an MS Access DB
Prepared Statement problem in my servlet's data manager