Re: JDBC Driver Help...

From: Joachim Achtzehnter <joachim(at)kraut(dot)bc(dot)ca>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: JDBC Driver Help...
Date: 2000-09-06 05:47:16
Message-ID: Pine.LNX.4.21.0009052238070.505-100000@wizard.kraut.bc.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Yesterday, in a message to pgsql-interfaces, Eric Buschelmann wrote:
>
> public class Test extends Applet

You should try an application first before complicating things with applet
issues. Once you get JDBC working with an application you can go on to an
applet.

> Class.forName("org.postgresql.Driver").newInstance();

Creating an instance is not necessary, just load the class:

Class.forName("org.postgresql.Driver");

> con=DriverManager.getConnection("jdbc:postgresql:ehb","ehb","rhimgeti");

This looks ok.

> catch (SQLException excpt0)
> {
> textArea2.setText("SQL EXCEPTION ON QUERY!!!");
> }

To obtain some more info about the failure print a stack trace:

excpt0.printStackTrace();

Are you running the postmaster with the -i flag? Did you configure
Postgresql to permit TCP connections from the host where your
application/applet runs?

Joachim

--
work: joachima(at)realtimeint(dot)com (http://www.realtimeint.com)
private: joachim(at)kraut(dot)bc(dot)ca (http://www.kraut.bc.ca)

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter Mount 2000-09-06 08:01:48 RE: JDBC and Unicode problem
Previous Message Zeljko Trogrlic 2000-09-05 18:47:13 Re: JDBC and Unicode problem