public class SQLWarning extends SQLException
SQLWarnings happen when database access warnings occur. The SQLWarning supplies details in order to discover the reason why it was created. Several methods exist to obtain such information.
See also: getWarnings
SQLWarning
public SQLWarning(String reason, String SQLstate, int vendorCode)
This creates a SQLWarning object providing a reason, an XOPEN SQLState, and a vendor code.
Parameters:
reason: | A short message for the warning |
SQLState: | An XOPEN code to identify the warning |
vendorCode: | A database vendor warning code |
SQLWarning
public SQLWarning(String reason, String SQLstate)
This creates a SQLWarning object providing a reason and an XOPEN SQLState. The vendor code is set to 0.
Parameters:
reason: | A short message for the warning |
SQLState: | An XOPEN code to identify the warning |
SQLWarning
public SQLWarning(String reason)
This creates a SQLWarning object providing a reason. The XOPEN SQLState is set to null, and the vendor code is set to 0.
Parameters:
reason: | A short message for the warning |
SQLState: | An XOPEN code to identify the warning |
SQLWarning
public SQLWarning()
This creates a SQLWarning object without providing additional information. The reason and XOPEN SQLState are set to null, and the vendor code is set to 0.
getNextWarning
public SQLWarning getNextWarning()
This gets the warning chained to the current warning.
Returns: The next SQLWarning
setNextWarning
public void setNextWarning(SQLWarning w)
This adds a SQLWarnings.
Parameters:
w: | A new SQLWarning |