pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joachim Achtzehnter <joachim@kraut.bc.ca>
To: pgsql-interfaces@postgresql.org
Subject: Re: Connection.setBytes()
Date: Tue, 18 Jul 2000 12:48:15 -0700 (Pacific Daylight Time)
Message-ID: <Pine.WNT.4.21.0007181243590.131-100000@van4> (raw)
In-Reply-To: <3974AB40.2892E26B@netasol.com>

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




view thread (12+ messages)  latest in thread

Message-ID: <Pine.WNT.4.21.0007181243590.131-100000@van4>
Permalink:  ../Pine.WNT.4.21.0007181243590.131-100000@van4/
Also on:    postgresql.org/message-id/Pine.WNT.4.21.0007181243590.131-100000@van4

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-interfaces@postgresql.org
  Cc: joachim@kraut.bc.ca
  Subject: Re: Connection.setBytes()
  In-Reply-To: <Pine.WNT.4.21.0007181243590.131-100000@van4>
  References: <3974AB40.2892E26B@netasol.com> <Pine.WNT.4.21.0007181243590.131-100000@van4>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox