File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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
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: 31074
    
232

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


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there any difference between executeUpdate and execute?