Re: Connection.setBytes()

From: Matt Fair <matt(at)netasol(dot)com>
To: Joachim Achtzehnter <joachim(at)kraut(dot)bc(dot)ca>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Connection.setBytes()
Date: 2000-07-18 20:00:43
Message-ID: 3974B769.EEFC6CBE@netasol.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces pgsql-novice

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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Matt Fair 2000-07-18 21:15:24 Searching Blobs
Previous Message Joachim Achtzehnter 2000-07-18 19:57:16 Re: Connection.setBytes()

Browse pgsql-novice by date

  From Date Subject
Next Message WOLF, PATRICK 2000-07-18 20:28:53 RE: How to get ODBC going?
Previous Message Joachim Achtzehnter 2000-07-18 19:57:16 Re: Connection.setBytes()