8.5.60 getWarnings()
- Organization of this subsection
(1) Function
This method acquires the first warning reported by a call related to this ResultSet object. If there is more than one warning, the subsequent warnings are chained to the first warning and can be acquired by calling the getNextWarning method of the SQLWarning object for the immediately preceding warning that was acquired.
(2) Format
public synchronized SQLWarning getWarnings() throws SQLException
(3) Arguments
None.
(4) Return value
The method returns the first SQLWarning object. If there is no SQLWarning object, the method returns null.
(5) Exceptions
The JDBC driver throws an SQLException in the following cases:
-
This ResultSet object is closed.
This includes the case where the ResultSet object was closed because the Statement object that created this ResultSet object was closed.
-
The Connection used to create the Statement object that created this ResultSet object has been closed.
-
The ResultSet object has become invalid due to transaction settlement.