How to connect with JDBC to another machine ?

Поиск
Список
Период
Сортировка
Искать

How to connect with JDBC to another machine ?

От:
Constantin Teodorescu <teo@flex.ro>
Дата:
It may be a silly question, but ...

How do I specify in Java that JDBC should getConnection with a
PostgreSQL running on another machine ?
Something like 'host:port:jdbc:postgresql:database' ?

TIA
-- 
Constantin Teodorescu
FLEX Consulting Braila, ROMANIA

Re: [INTERFACES] How to connect with JDBC to another machine ?

От:
Peter T Mount <peter@retep.org.uk>
Дата:
On Tue, 29 Dec 1998, Constantin Teodorescu wrote:

> It may be a silly question, but ...
> 
> How do I specify in Java that JDBC should getConnection with a
> PostgreSQL running on another machine ?
> Something like 'host:port:jdbc:postgresql:database' ?

Close ;-)

jdbc:postgresql://host/database

or

jdbc:postgresql://host:port/database

-- 
       Peter T Mount peter@retep.org.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

FAQ