exception while upgrading driver - Mailing list pgsql-jdbc

From Sathyajith G
Subject exception while upgrading driver
Date
Msg-id 9648E4D3482.000004D1sathyajith@inbox.com
Whole thread Raw
Responses Re: exception while upgrading driver
Re: exception while upgrading driver
List pgsql-jdbc
Hi
   i have the following code running without any errors with postgres 7.4.2.
driver.



String qry="select MAX(num) from (select
to_number((substr(acr_id,4)),'9999') as num from aircraft where acr_id  like
'ACR%'  group by acr_id) as num ";  // order by num desc";

try{
  ResultSet rs=Data.getResultSet(qry);
  while(rs.next())
   {
        try{
            acrmax=Integer.parseInt(rs.getString(1))+1;
           }catch(NumberFormatException ne){acrmax=0;}
   }
  }
  catch(SQLException ex) { System.err.println("for rs1 err
"+ex.getMessage());
        }



I changed the driver to postgres 8.0.1.  Strangely now, the above code gives
the exception "The resultset is closed". Please help.

regards,

Sathya

pgsql-jdbc by date:

Previous
From: Mark Lewis
Date:
Subject: Re: DatabaseMetaData and Transactions
Next
From:
Date:
Subject: 8.x driver with EJB CMP