From: | Peter T Mount <peter(at)retep(dot)org(dot)uk> |
---|---|
To: | Andrea Antibo <antibo(at)mclink(dot)it> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: [INTERFACES] applet |
Date: | 1998-10-14 17:30:21 |
Message-ID: | Pine.LNX.3.96.981014182717.31130H-100000@maidast.retep.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Three things here:
1) The Class.forName() line isn't needed if you use the jdbc.drivers
property. It doesn't hurt, but not required.
2) The JDBC Url is wrong. it should read jdbc:postgresql:tesi
3) You may be having problems with the null password. If you are using
trust, or ident authentication (set in pg_hba.conf), then you could put
anything in here. Otherwise, use "Alter user" to set yourself a password,
and put it in here.
On Wed, 14 Oct 1998, Andrea Antibo wrote:
> Hi,
> I'm writing un applet for my application with postgres but it don't load (I
> think) jdbc driver.
> I add in .hotjava/properties jdbc.drivers=postgresql.Driver.
>
> try{
> resultsTextArea.setText("elaborazione in corso");
>
> Class.forName("postgresql.Driver");
>
> String url = "jdbc:postgres:tesi";
> String usr = "andrea";
> String pwd = "";
>
>
> db = DriverManager.getConnection(url, usr, pwd);
>
> st = db.createStatement();
>
> ....
> ....
> }
>
>
> It jump this try block.
> What I can do?
>
>
--
Peter T Mount peter(at)retep(dot)org(dot)uk
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
Java PDF Generator: http://www.retep.org.uk/pdf
From | Date | Subject | |
---|---|---|---|
Next Message | Ludovic Marcotte | 1998-10-15 03:17:56 | Perl/Pg.pm/DBI.pm question |
Previous Message | Andrea Antibo | 1998-10-14 14:44:03 | applet |