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

Can I use prep.execute to update a record?

 
Ryan Webb
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers!

I just want to confirm if I can use prep.execute(sql) to update a database record instead of prep.executeUpdate(sql)?

where sql = "UPDATE <table> SET <column> = '<data>'";

Thanks!
Ryan Webb
 
Jan Cumps
Bartender
Posts: 2602
13
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
from the API doc:

Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement. .....
 
Ryan Webb
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh i see! Thanks!

Ryan Webb
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic