File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Can I use prep.execute to update a record? 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 "Can I use prep.execute to update a record?" Watch "Can I use prep.execute to update a record?" New topic
Author

Can I use prep.execute to update a record?

Ryan Webb
Greenhorn

Joined: Dec 09, 2009
Posts: 28
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


frustrated to learn c/c++/objective-c
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2476
    
    7

from the API doc:

Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement. .....


OCUP UML fundamental and ITIL foundation
youtube channel
Ryan Webb
Greenhorn

Joined: Dec 09, 2009
Posts: 28
Oh i see! Thanks!

Ryan Webb
 
Don't get me started about those stupid light bulbs.
 
subject: Can I use prep.execute to update a record?
 
Similar Threads
ejbcreate() and ejbStore()
CMT & Transaction Attribute
Record-Level Locking In JDBC
Update based on Row id
native SQL update in Hibernate