Sets an SQL 1-D ARRAY value designated by this Array object with values provided in the input ResultSet. Element values in the Array object are set starting from the lowest value of the first column to the highest.
- This method supports 1-D arrays only.
- Fewer than the maximum number of elements specified in the ResultSet may be set in the Array, in case the Array was constructed with fewer elements.
Syntax
void setResultSet(ResultSet arrayResultSet)
throws SQLException
Syntax Elements
- arrayResultSet
- A ResultSet consisting of two columns, an index and an element value.
Exceptions
Throws SQLException in the following cases:
- The method is called for an N-D array. A database specific code “9743 (ERRUDFJAVARRAY)< <Method> cannot be called for N-D Arrays>” is returned.
- An error occurs while attempting to access the array. A database specific code “9743 (ERRUDFJAVARRAY) <Failed to set Array elements with provided ResultSet>” is returned.