X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2DC9FDB1C6 for ; Fri, 28 Oct 2005 07:18:46 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 22315-10 for ; Fri, 28 Oct 2005 10:18:42 +0000 (GMT) Received: from xmail03.myhosting.com (xmail03.myhosting.com [168.144.250.217]) by svr1.postgresql.org (Postfix) with ESMTP id 9D9E1DB13A for ; Fri, 28 Oct 2005 07:18:43 -0300 (ADT) Received: (qmail 5036 invoked from network); 28 Oct 2005 10:18:45 -0000 Received: from unknown (HELO [127.0.0.1]) (Authenticated-user:_aydin.toprak@intengo.com@[85.96.214.144]) (envelope-sender ) by xmail03.myhosting.com (qmail-ldap-1.03) with SMTP for ; 28 Oct 2005 10:18:44 -0000 Message-ID: <4361FAE1.4010806@intengo.com> Date: Fri, 28 Oct 2005 13:18:09 +0300 From: =?UTF-8?B?QXlkxLFuIFRvcHJhaw==?= User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Problems with ResultSet Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 0543-2, 10/27/2005), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200510/142 X-Sequence-Number: 14073 Hiii, I have just stuck with a little point of my code which generates "This ResultSet is closed." exception .... here is my stack trace ... org.postgresql.util.PSQLException: This ResultSet is closed. org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkClosed(AbstractJdbc2ResultSet.java:2444) org.postgresql.jdbc2.AbstractJdbc2ResultSet.next(AbstractJdbc2ResultSet.java:1810) org.apache.jsp.event.Proposal.frameBuyer_jsp._jspService(org.apache.jsp.event.Proposal.frameBuyer_jsp:61) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) ... and continues... I want to return ResultSet from static method (I have never did before, I guess I can ..??.) ... I get resultset from my jsp page and want to display it ... so ı wrote this database access staff into another class file to sperate them ... anyway.. try { stmnt = con.prepareStatement(query); stmnt.setInt(1, event_id); ps = stmnt.executeQuery(); stmnt.close(); connMgr.freeConnection("mypool", con); if(ps.next()) out.append("This is your element :"+ps.getInt("event_id")); } this is the part of the code wich generated that exception... as a result of my obeservations and try... I can directly point that the porblem comes from this if(ps.next()) out.append("This is your element :"+ps.getInt("event_id")); part of the code... but I dont understand why?.... the query is file, P.statement and connection is exist ... and also there is an integer coloumn "event_id" in table... is it about the static method or what..? .. Thanks..