PrepAway - Latest Free Exam Questions & Answers

To properly handle SQLException under JDBC, you must use

To properly handle SQLException under JDBC, you must use

PrepAway - Latest Free Exam Questions & Answers

A.
a try/catch block

B.
a Exception pointer

C.
the Err object

D.
the error table

E.
the master error dictionary

Explanation:
Many of the methods in the java.sql package throw an SQLException , which requires a
try/catch block like any other Exception. Its purpose is to describe database or driver
errors (SQL syntax, for example). In addition to the standard getMessage() inherited from
Throwable, SQLException has two methods which provide further information, a method
to get (or chain) additional exceptions and a method to set an additional exception.


Leave a Reply