> +
> + conn = DriverManager.getConnection(connString.toString());
> +
> + Statement stmt = null;
> + ResultSet rs = null;
> +
> + try {
> + stmt = conn.createStatement();
> + rs = stmt.executeQuery("SELECT 3+5"); // A simple query that
> tests the engine but creates no tables and is fairly fast
> + rs.first();
> + System.out.println("3+5 is " + rs.getInt(1));
> + } catch (SQLException ex){
> + // handle any errors
> + System.out.println("SQLException: " + ex.getMessage());
> + System.out.println("SQLState: " + ex.getSQLState());
> + System.out.println("VendorError: " + ex.getErrorCode());
I think you'll still want to do a e.printStackTrace() here.
All of the other exception handling just names the Exception variable e so do
that here too.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/6/files#r5281262