|
Answer» ResultSet refers to the row and column data contained in a ResultSet object. The object of ResultSet maintains a cursor pointing to the CURRENT row of data in the result set. There are three types of ResultSet which have constants to control the movement of the cursor in backward, FORWARD, and in a particular row. If we do not declare any ResultSet, then by default TYPE_FORWARD_ONLY will be called. - ResultSet.TYPE_FORWARD_ONLY: USING this, the cursor can only move forward from start to END in the result set.
- ResultSet.TYPE_SCROLL_INSENSITIVE: Using this, the cursor can move in both forward and backward directions. Here, the result set is INSENSITIVE to the changes done in the database by others, that occur after the result set was created.
- ResultSet.TYPE_SCROLL_SENSITIVE: Using this, the cursor can move in forward and backward direction, and the result set is sensitive to changes made to the database by others, that occur after the result set was created.
|