Can someone explain this error? It is a compile-time error on the SQLException in the throws statement. I want to go to the catch phrase in the calling routine, so instead of doing a try-catch clause in this routine, I am throwing the SQLException. I know SQLException is the right type to throw because if I remove the throws clause, then the compiler says "Unhandled exception type SQLException". Here is my code. Thanks in advance for your help.
-Jeff
public boolean LCExists(String LCID) throws SQLException {
// No try catch here because I want caller to process error.
PreparedStatement pst = Conn.prepareStatement("select LC_ID from ECLS_LOCAL_COUNSEL_MSTR where LC_ID='"+LCID+"'");
ResultSet rSet = pst.executeQuery();
rSet.next();
return false;
}
ANSWER: The problem was that I had not imported java.sql.SQLException;
Message was edited by:
JavaJeffrey