From: | Joachim Achtzehnter <joachim(at)kraut(dot)bc(dot)ca> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: Connection.setBytes() |
Date: | 2000-07-18 19:48:15 |
Message-ID: | Pine.WNT.4.21.0007181243590.131-100000@van4 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces pgsql-novice |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Joachim Achtzehnter | 2000-07-18 19:57:16 | Re: Connection.setBytes() |
Previous Message | ChristophSchmidt | 2000-07-18 19:32:31 | Re: Connection.setBytes() |
From | Date | Subject | |
---|---|---|---|
Next Message | Joachim Achtzehnter | 2000-07-18 19:57:16 | Re: Connection.setBytes() |
Previous Message | ChristophSchmidt | 2000-07-18 19:32:31 | Re: Connection.setBytes() |