Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null
Log in to the WebSphere Application Server administration console.
Select Resources > JDBC > Data sources > Application Center DataSource name > Custom properties and click New.
In the Name field, enter allowNextOnExhaustedResultSet.
In the Value field, type 1.
Change the type to java.lang.Integer.
Click OK.
Click New.
In the Name field, enter resultSetHoldability.
In the Value field, type 1.
Change the type to java.lang.Integer.
Click OK and save your changes.
Specifies how the IBM Data Server Driver for JDBC and SQLJ handles a ResultSet.next() call for a forward-only cursor that is positioned after the last row of the ResultSet. The data type of this property is int.
Possible values are:
DB2BaseDataSource.YES (1)
For a ResultSet that is defined as TYPE_FORWARD_ONLY, ResultSet.next() returns false if the cursor was previously positioned after the last row of the ResultSet. ResultSet.next() returns false, regardless of whether the cursor is open or closed.
DB2BaseDataSource.NO (2)
For a ResultSet that is defined as TYPE_FORWARD_ONLY, when ResultSet.next() is called, and the cursor was previously positioned after the last row of the ResultSet, the driver throws a java.sql.SQLException with error text “Invalid operation: result set is closed.” This value is the default.
版权声明:本文为博主原创文章,未经博主允许不得转载。
DB2
- 上一篇:oracle dbtimezone显示错误
- 下一篇:AIX下安装SVN