my dog learned polymorphism*
The moose likes JDBC 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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "update button" Watch "update button" New topic
Author

update button

vicneswaran boi
Greenhorn

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
Bartender

Joined: Oct 18, 2000
Posts: 4121

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


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: update button
 
Similar Threads
doubt in a mock exam question
Which statement is true regarding initialization parameter
How to ?
Is Fowarder-receiver promiscuous?
How Multiple Inheritance can be achieved in Java ?