wood burning stoves 2.0*
The moose likes JDBC and the fly likes clarify updateInt method in ResultSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "clarify updateInt method in ResultSet" Watch "clarify updateInt method in ResultSet" New topic
Author

clarify updateInt method in ResultSet

Gary Frick
Greenhorn

Joined: Sep 13, 2002
Posts: 28
Can someone tell me why I am not seeing the effect of updateInt on the row in resultSet.
Scenario:
1). I do a query to recieve one record in my resultSet.
2). Display record for user to verify.
3). If user changes a field value, I apply the users change to the field value in the resultSet row via an updateInt() method.
4). I pass the resultSet to a class/method that handles the inserts
5). Method inserts updated record into another table in same Database.
Problem:
Since I am inserting the modifed record into another DB, I don't do the updateRow() method. Instead I do a separate Insert using the modified resultSet. However, the ResultSet isn't reflecting the change. I even attempt to display the ResultSet after doing the updateInt but it doesn't show the change either.
rs.updateInt(<value>,<pos> ;
rs.first();
rs.getString(<value> ;
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: clarify updateInt method in ResultSet