• Post Reply Bookmark Topic Watch Topic
  • New Topic

stmt.executeUpdate() and stmt.executeUpdate() != 1  RSS feed

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that we may use either

or

to update fields in databases. What is the advantage of using one over another?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
per the API:
executeUpdate()

Returns:
either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing.

Your second statement doesn't make sense.
[ January 10, 2004: Message edited by: Gregg Bolinger ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!