Re: Problem to connect from host via JDBC ... - Mailing list pgsql-jdbc

From Nick Fankhauser
Subject Re: Problem to connect from host via JDBC ...
Date
Msg-id NEBBLAAHGLEEPCGOBHDGGEOMEHAA.nickf@ontko.com
Whole thread Raw
In response to Problem to connect from host via JDBC ...  (<tsmets@brutele.be>)
List 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


pgsql-jdbc by date:

Previous
From: Ned Wolpert
Date:
Subject: Re: Open patches
Next
From: Eric Scroger
Date:
Subject: A result was returned by the statement, when none was expected