Hi all
Does anyone know why the following code causes my Java (tomcat ) window to 
crash. Any help at all would be much appreciated
public String getName() throws Exception {
                Statement statement = connection.createStatement();
                int myInt = 1;
                ResultSet rs = statement.executeQuery("SELECT Name"+
                " FROM nameAddress" +
                " WHERE ID = ("+
                myInt + ")");
                rs.next();
                String myString = rs.getString("Name");
               //change the resultSet to a string
               //so it can be used by the jsp page
                return myString;
    }
I think the throws exception part is causing the server to crash.
However on the JSP page i have the following line of code
<% nameAddresshandler na = new nameAddresshandler(); %>
<%System.out.println(na.getName());%>
This prints out the correct name of the "Name" to the tomcat window, then a 
java error appears and shuts down tomcat. Do I have to install JDK again?
Thanks in advance, Mick

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Reply via email to