This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes diff bw execute and executeUpdate() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "diff bw execute and executeUpdate()" Watch "diff bw execute and executeUpdate()" New topic
Author

diff bw execute and executeUpdate()

vinodheee kumar
Greenhorn

Joined: Apr 26, 2006
Posts: 9
can you tell diff between Statement methods

execute() and executeUpdate()
in most cases i am using executeUpdate()
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

http://www.coderanch.com/t/301594/JDBC/java/Difference-between-execute-executeQuery-executeUpdate


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Sreenivasan M
Greenhorn

Joined: Oct 05, 2006
Posts: 10
boolean execute()
Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement.

ResultSet executeQuery()
Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.

int executeUpdate()
Executes the SQL statement in this PreparedStatement object, which must be an SQL INSERT, UPDATE or DELETE statement; or an SQL statement that returns nothing, such as a DDL statement.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: diff bw execute and executeUpdate()
 
Similar Threads
statement insertion problem
SQL statements
Execute .executequery,executeupdate
What is the difference between executeUpdate and execute?
Is there any difference between executeUpdate and execute?