PrepAway - Latest Free Exam Questions & Answers

Which of the following classes may you use?

You are the database specialist of your company. You are managing the in-house
database systems. In your JDBC application you want to provide warnings to users
without terminating the operations. Which of the following classes may you use?

PrepAway - Latest Free Exam Questions & Answers

A.
SQLWarning

B.
SQLNotice

C.
SQLError

D.
SQLInform

E.
SQLWarns

Explanation:
According to the online Java tutorial provided by Sun at java.sun.com An
SQLWarning is a subclass of SQLException, but is not thrown like other
exceptions. The programmer must specifically ask for warnings. Connections,
Statements, and ResultSets all have a getWarnings(. method that allows retrieval.
There is also a clearWarnings(. method to avoid duplicate retrievals. The
SQLWarning class itself only adds the methods getNextWarning(. and
setNextWarning(.. An SQLWarning is very similar to traditional compiler
warnings something not exactly right occurred, but its effect was not severe enough
to end processing. Whether it is important enough to investigate depends on the
operation and context.


Leave a Reply