当前位置: 技术问答>java相关
谁能帮帮忙具体讲解一下CONCUR_TYPE的具体有哪几种设置
来源: 互联网 发布时间:2015-02-26
本文导语: 同上 | JDBC 2.0 TYPE_FORWARD_ONLY : The cursor supports only a fetch type of Forward Only . This is equivalent to the ResultSet type supported by JDBC 1.0 . The cursor can only move in the Forward direction. TYPE...
同上
|
JDBC 2.0
TYPE_FORWARD_ONLY : The cursor supports only a fetch type of Forward Only . This is equivalent to the ResultSet type supported by JDBC 1.0 . The cursor can only move in the Forward direction.
TYPE_SCROLL_INSENSITIVE : The cursor generated will be of type 'Keyset' . i.e., it supports scrolling, but it is not sensitive to changes that are made while it is open. Inserts to the database made outside the cursor are not visible in the cursor unless the cursor is closed and reopened.
TYPE_SCROLL_SENSITIVE : The cursor generated will be of type Dynamic. ie, the ResultSet reflects all changes made while cursor is open. The data values, order, and membership of the rows in the result set can change on each fetch. All UPDATE, INSERT, and DELETE statements made by users are visible through the cursor.
TYPE_SCROLL_SENSITIVE+1 :Defines a cursor that makes a temporary copy of the data to be used by the cursor. All requests to the cursor are answered from this temporary table in tempdb; therefore, modifications made to base tables are not reflected in the data returned by fetches made to this cursor, and this cursor does not allow modifications. The cursor generated will be of type Static. It uses concurrency of CONCUR_READ_ONLY
CONCUR_UPDATABLE : Allow updates. this option must be set to make the ResultSet Updatable.
CONCUR_READ_ONLY : Read-only cursor. If you set this option, ResultSet becomes read only. No updates are possible.
TYPE_FORWARD_ONLY : The cursor supports only a fetch type of Forward Only . This is equivalent to the ResultSet type supported by JDBC 1.0 . The cursor can only move in the Forward direction.
TYPE_SCROLL_INSENSITIVE : The cursor generated will be of type 'Keyset' . i.e., it supports scrolling, but it is not sensitive to changes that are made while it is open. Inserts to the database made outside the cursor are not visible in the cursor unless the cursor is closed and reopened.
TYPE_SCROLL_SENSITIVE : The cursor generated will be of type Dynamic. ie, the ResultSet reflects all changes made while cursor is open. The data values, order, and membership of the rows in the result set can change on each fetch. All UPDATE, INSERT, and DELETE statements made by users are visible through the cursor.
TYPE_SCROLL_SENSITIVE+1 :Defines a cursor that makes a temporary copy of the data to be used by the cursor. All requests to the cursor are answered from this temporary table in tempdb; therefore, modifications made to base tables are not reflected in the data returned by fetches made to this cursor, and this cursor does not allow modifications. The cursor generated will be of type Static. It uses concurrency of CONCUR_READ_ONLY
CONCUR_UPDATABLE : Allow updates. this option must be set to make the ResultSet Updatable.
CONCUR_READ_ONLY : Read-only cursor. If you set this option, ResultSet becomes read only. No updates are possible.