Scalable Database Server, HiRDB Version 8 UAP Development Guide
The SQLWarning class provides the following function:
The SQLWarning object is accumulated without an issuance of exception in the method object that caused the warning.
The SQLWarning object is accumulated by chain from the method object that caused the warning (Connection, Statement, PreparedStatement, CallableStatement, or ResultSet).
To explicitly release the accumulated SQLWarning object, you must execute clearWarnings from the object connecting the chain.
If the warnings caused by execution of SQL statements are to be retained in the JDBC driver according to the warning retention level specification, the SQLWarning objects are generated and the warning information is retained. The following table describes the SQLWarning generation conditions:
Execution result of SQL statement | Warning retention level | ||
---|---|---|---|
IGNORE | SQLWARN | ALLWARN | |
SQLCODE is greater than 0 and is not 100, nor 110, nor 120 | N | N | Y |
SQLWARN0 in the SQL Communications Area is W (except when SQLWARN6 is W) | N | Y | Y |
Warning occurred in the JDBC driver | N | Y | Y |
The following table presents the messages that can be acquired from SQLWarning:
Condition | Message acquired by getMessage |
---|---|
SQLWARN0 is W | KFPJ01074-W |
SQLWARN0 is '' and SQLCODE is greater than 0 (except when SQLCODE=100, 110, or 120) | KFPAXXXXX-X |
Warning occurred in the JDBC driver | KFPJXXXXX-W |
When warning occurs during updating of multiple rows during batch updating, only one SQLWarning is generated.
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.