Skip site navigation (1) Skip section navigation (2)

Re: exception while upgrading driver

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Sathyajith G <sathyajith(at)inbox(dot)com>
Cc: Kris Jurka <books(at)ejurka(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: exception while upgrading driver
Date: 2005-06-07 21:46:38
Message-ID: 42A615BE.9070603@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Sathyajith G wrote:

> public static  ResultSet getResultSet(String sql)
>      {
>        ResultSet rs;
>         try{
>              rs=stmt.executeQuery(sql);
>             }catch(Exception e)
>                    {System.err.println("error");
>                     rs=null;
>                     }
>             return rs;
>      }

Where does 'stmt' come from?

Can we see a compilable testcase that shows the problem? Code fragments
really aren't too useful for this sort of problem -- we need to see
everything involved with talking to the JDBC driver. e.g. perhaps the
lifetime of your Statement is not what you think it is and it's getting
GCed unexpectedly.. but I can't say for sure without seeing the actual
code you're running.

-O

In response to

pgsql-jdbc by date

Next:From: Oliver JowettDate: 2005-06-07 22:40:53
Subject: Re: Num of returned ROWS
Previous:From: Oliver JowettDate: 2005-06-07 21:43:53
Subject: Re: exception while upgrading driver

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group