This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Is there any difference between executeUpdate and execute? 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 "Is there any difference between executeUpdate and execute?" Watch "Is there any difference between executeUpdate and execute?" New topic
Author

Is there any difference between executeUpdate and execute?

thomas davis
Ranch Hand

Joined: Feb 01, 2003
Posts: 207
Is there any difference between executeUpdate and execute?
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

In case someone sees this thread later, it was answered
here


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
VIJAY Yadlapati
Ranch Hand

Joined: Aug 04, 2003
Posts: 175
executeUpdate() is special form of execute(), that only performs DML Operations, while execute() performs any SQL Operation within the limitations of the support of database driver being used.
That's why executeUpdate() returns int - No. of rows affected, while execute() returns boolean depending on the previous operation performed.
 
Have you checked out Aspose?
 
subject: Is there any difference between executeUpdate and execute?
 
It's not a secret anymore!