From: Matt Fair <matt@netasol.com>
To: Joachim Achtzehnter <joachim@kraut.bc.ca>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Connection.setBytes()
Date: Tue, 18 Jul 2000 15:00:43 -0500
Message-ID: <3974B769.EEFC6CBE@netasol.com> (raw)
References: <Pine.WNT.4.21.0007181243590.131-100000@van4>
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
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: matt@netasol.com, joachim@kraut.bc.ca
Subject: Re: Connection.setBytes()
In-Reply-To: <3974B769.EEFC6CBE@netasol.com>
* 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