This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes update button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "update button" Watch "update button" New topic

update button

vicneswaran boi

Joined: Sep 06, 2004
Posts: 13
What is the statement to execute update.

ResultSet columns = statement.executeUpdate("SELECT * FROM Member");
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
read the docs. executeUpdate() returns you an int not a ResultSet.
and update means DMLs (insert, update, delete). for select statement we use executeQuery() rather than executeUpdate().

Query means select
Update means insert, update, delete

i hope it would be clear now.
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Since this has nothing to do with JSPs, I'm moving it to the JDBC forum...

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: update button
jQuery in Action, 3rd edition