rs.close();
        stmt.close();

        I'll warn you now, the JDBC-ODBC bridge will cause you lots of
problems and you should avoid it.  You can search on Sun's BugParade to find
out more about its flaws.  If you need to access MS Access, I believe that
there are a few other drivers to access Access - this would also be on the
Javasoft site.

        Randy


> -----Original Message-----
> From: Mick Sullivan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 19, 2001 3:02 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Help on error?
> 
> 
> Thats a good guess alright. Im using the JDBC-ODBC bridge 
> with an MS Access 
> database :-(
> I have to do it that way coz a fella whos in my course set up 
> the Drivers 
> and all that for me.
> Could you just tell me how I would close the Result set and statement.
> Is it   'rs.close();'  or something along those lines.
> Thanks again in advance,
> Mick
> 
> 
> 
> ----Original Message Follows----
> From: Randy Layman <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: RE: Help on error?
> Date: Mon, 19 Mar 2001 14:11:29 -0500
> 
> 
>       What database and JDBC driver are you using?  If I had 
> to guess I'd
> say that you are using the JDBC-ODBC bridge and you have 
> encountered one of
> several problems that JDBC-ODBC bridge has.  There is no fix, only
> workarounds.  In your case the problem is because you haven't 
> closed the
> ResultSet and Statement, leaving them open so that the next 
> query executed
> will cause an error.  This is part of the reason that the 
> bridge is labeled
> experimental and is not supported by Sun.
> 
>       Randy
> 
> 
>  > -----Original Message-----
>  > From: Mick Sullivan [mailto:[EMAIL PROTECTED]]
>  > Sent: Monday, March 19, 2001 2:29 PM
>  > To: [EMAIL PROTECTED]
>  > Subject: Help on error?
>  >
>  >
>  > 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.
> 
> ______________________________________________________________
> ___________
> Get Your Private, Free E-mail from MSN Hotmail at 
http://www.hotmail.com.

Reply via email to