Re: Connection.setBytes() - Mailing list pgsql-interfaces

From Matt Fair
Subject Re: Connection.setBytes()
Date
Msg-id 3974B769.EEFC6CBE@netasol.com
Whole thread Raw
In response to Re: Connection.setBytes()  (Joachim Achtzehnter <joachim@kraut.bc.ca>)
List pgsql-interfaces
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



pgsql-interfaces by date:

Previous
From: Joachim Achtzehnter
Date:
Subject: Re: Connection.setBytes()
Next
From: Matt Fair
Date:
Subject: Searching Blobs