Re: Problem to connect from host via JDBC ...

From: "Nick Fankhauser" <nickf(at)ontko(dot)com>
To: <tsmets(at)brutele(dot)be>
Cc: "pgsql-jdbc" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Problem to connect from host via JDBC ...
Date: 2002-03-05 22:01:42
Message-ID: NEBBLAAHGLEEPCGOBHDGGEOMEHAA.nickf@ontko.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


> > psql -h<hostname> <database name>
> >
>
> That work of course.

OK, so we know the DB is accepting connections- that's progress...

This URL doesn't look quite right to me.

> conn = DriverManager.getConnection(
> "jdbc:postgresql:company:@192.168.1.103:5432",
> "postgres",
> "" );

assuming the database name is "company" Try changing this to:

conn = DriverManager.getConnection(
"jdbc:postgresql://192.168.1.103/company",
"postgres",
"" );

-NickF

Browse pgsql-jdbc by date

  From Date Subject
Next Message Eric Scroger 2002-03-05 22:27:59 A result was returned by the statement, when none was expected
Previous Message Ned Wolpert 2002-03-05 20:39:26 Re: Open patches