What is updated ResultSets?

This question is related to Oracle Interview

Showing Answers 1 - 1 of 1 Answers

Sunil

  • Sep 25th, 2006
 

I presume that the question should be "What is updatable ResultSet?"Here is what JavaDoc says about this.A default ResultSet object is not updatable and has a cursor that moves forward only. It is possible to produce ResultSet objects that are updatable. The following code fragment, in which con is a valid Connection object, illustrates how to make a result set that is scrollable and insensitive to updates by others, and that is updatable. Statement stmt = con.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2"); // rs will be scrollable, will not show changes made by others, // and will be updatable

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions