What’s the best way to test SQL Server connection programmatically?

I have had a difficulty with the EF when the connection the server is stopped or paused, and I raised the same question. So for completeness to the above answers here is the code. /// <summary> /// Test that the server is connected /// </summary> /// <param name=”connectionString”>The connection string</param> /// <returns>true if the connection … Read more

Submitting form to Servlet which interacts with database results in blank page

You need to properly handle exceptions. You should not only print them but really throw them. Replace } catch (Exception e) { e.printStackTrace(); // Or System.out.println(e); } by } catch (Exception e) { throw new ServletException(“Login failed”, e); } With this change, you will now get a normal error page with a complete stacktrace about … Read more