Received: from cda.mrs.umn.edu (root@cda.mrs.umn.edu [146.57.3.11]) by hub.org (8.10.1/8.10.1) with ESMTP id e6IK0Uh90947 for ; Tue, 18 Jul 2000 16:00:30 -0400 (EDT) Received: from netasol.com (ctrts1-3.mrs.umn.edu [146.57.4.203]) by cda.mrs.umn.edu (8.10.0/8.10.0) with ESMTP id e6IK0Q118707; Tue, 18 Jul 2000 15:00:26 -0500 (CDT) Message-ID: <3974B769.EEFC6CBE@netasol.com> Date: Tue, 18 Jul 2000 15:00:43 -0500 From: Matt Fair Organization: Netasol Networks, Inc. X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i586) X-Accept-Language: en MIME-Version: 1.0 To: Joachim Achtzehnter CC: pgsql-interfaces@postgresql.org Subject: Re: Connection.setBytes() References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200007/130 Thank you, I changed it and it doesn't throw a null pointer any more. Matt Fair Joachim Achtzehnter wrote: > On Tue, 18 Jul 2000, Matt Fair wrote: > > > > Here is the code I am using: > > > > public PsqlConsole(String url) { > > try{ > > ... > > con = DriverManager.getConnection("jdbc:postgr..."); > > con.setAutoCommit(false); > > } > > catch(ClassNotFoundException e) { > > ... > > } > > catch(SQLException e) { > > ... > > } > > finally { > > //always close the database > > try { > > if(con != null) con.close(); > > This closes the connection! Once this method returns your connection is > closed. Your subsequent SQL calls in the prompt() method use a closed > connection. > > Joachim