Scalable Database Server, HiRDB Version 8 UAP Development Guide
The SQLWarning interface provides the following principal function:
If a method object triggers a warning report, an SQLWarning object is accumulated without an exception notice to that method object.
SQLWarning objects are accumulated as a chain linked to the method object (Connection, Statement, PreparedStatement, or ResultSet) that triggers the warning reports.
To release accumulated SQLWarning objects explicitly, execute the clearWarnings method for the method object that triggered the warnings.
If the specified warning retention level indicates that warnings that occur during SQL execution are to be retained in the JDBC driver, the JDBC driver generates SQLWarning objects and retains warning information. In addition, a property can be used to specify warning retention for Connection objects.
Table 17-22 describes the conditions under which SQLWarning objects are generated.
Table 17-22 Conditions for generation of SQLWarning objects
SQL execution result | Warning retention level | |||
---|---|---|---|---|
IGNORE | SQLWARN | ALLWARN | ||
SQLCODE is a value greater than 0 other than 100, 110, or 120 | Generated by an object other than a Connection object | No | No | Yes |
Generated by a Connection object | No | No | Yes# | |
SQLWARN0 of the SQL Communication Area is W (except when SQLWARN6 is W) | Generated by an object other than a Connection object | No | Yes | Yes |
Generated by a Connection object | No | Yes# | Yes# | |
Warning occurs in the JDBC driver | Generated by an object other than a Connection object | No | Yes | Yes |
Generated by a Connection object | No | Yes# | Yes# |
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.