Received: from priv-edtnes04-hme0.telusplanet.net (edtnes04.telus.net [199.185.220.104]) by hub.org (8.10.1/8.10.1) with ESMTP id e6IJpDh87625 for ; Tue, 18 Jul 2000 15:51:13 -0400 (EDT) Received: from VAN4 ([216.232.28.37]) by priv-edtnes04-hme0.telusplanet.net (InterMail vM.4.01.02.11 201-229-116-111) with ESMTP id <20000718195112.GTQG4208.priv-edtnes04-hme0.telusplanet.net@VAN4> for ; Tue, 18 Jul 2000 13:51:12 -0600 Date: Tue, 18 Jul 2000 12:48:15 -0700 (Pacific Daylight Time) From: Joachim Achtzehnter To: pgsql-interfaces@postgresql.org Subject: Re: Connection.setBytes() In-Reply-To: <3974AB40.2892E26B@netasol.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200007/128 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