Java / JDBC
What is SQLWarning In JDBC?
SQLWarning is a subclass of SQLException that holds database access warnings. Warnings do not stop the execution of a specific application, as exceptions do.
A warning may be retrieved on the Connection object, the Statement object, PreparedStatement and CallableStatement objects, or on the ResultSet using getWarnings method.
SQLWarning warning = stmt.getWarnings(); while (warning != null) { System.out.println("Message: " + warning.getMessage()); System.out.println("SQLState: " + warning.getSQLState()); System.out.println("Vendor error code: " + warning.getErrorCode()); warning = warning.getNextWarning(); }
More Related questions...