Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

update button

 
vicneswaran boi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the statement to execute update.

ResultSet columns = statement.executeUpdate("SELECT * FROM Member");
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since this has nothing to do with JSPs, I'm moving it to the JDBC forum...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic