My code is working fine for this JSP page.
However, if bad SQL is passed to the page it will error out with a NULL pointer exception.
I have this catch below to show what the SQL exception error is, but it is not working:
try {
stmt = conn.createStatement();
result = stmt.executeQuery(""+QRYTE
XT.trim()+
"");
}
catch (SQLException e) {
System.out.println("Error occurred " + e);
}
Should I be using something else to capture the error?
Thanks
Start Free Trial