How to Make Updates to Updatable Result Sets?
Another new feature in the JDBC 2.0 API is the ability to update rows in a result set using methods in the Java programming language rather than having to send an SQL command. But before you can take advantage of this capability, you need to create a ResultSet object that is updatable. In order to do this, you supply the ResultSet constant CONCUR_UPDATABLE to the createStatement method.E.g.Connection con = DriverManager.getConnection("jdbc:mySubprotocol:mySubName");Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);ResultSet uprs = ("SELECT COF_NAME, PRICE FROM COFFEES");
-
Interview Candidate
- Aug 28th, 2004
- 2
- 2285
Showing Answers 1 - 2 of 2 Answers
Related Answered Questions
Related Open Questions
How to Make Updates to Updatable Result Sets?
Related Answered Questions
Related Open Questions