Re: [INTERFACES] JDBC driver and postgreSQL

Поиск
Список
Период
Сортировка
От Peter T Mount
Тема Re: [INTERFACES] JDBC driver and postgreSQL
Дата
Msg-id Pine.LNX.3.95.980507065212.3542C-100000@retep.org.uk
обсуждение исходный текст
Ответ на JDBC driver and postgreSQL  (Agus Mingtarja <mingtarja@hdz-ima.rwth-aachen.de>)
Список pgsql-interfaces
On Wed, 6 May 1998, Agus Mingtarja wrote:

> Hi All,
> i have postgresql 6.3.2 (Linux 2.0 debian) istalled, and i can make
> database now. My question ist:
> How can i install the JDBC driver? (i use JDK 1.1.5)

To install, put the postgresql.jar into your classpath.

There are instructions in the README, and in the FAQ

      http://www.retep.org.uk/postgres

> Ist my programm below correct?

Looks ok, except drop the second : in the JDBC URL. It should only be
there if a non standard port number is also given

>
> ...
> try
>       {  Class.forName("postgresql.driver");
>          // force loading of driver
>          String url = "jdbc:postgresql://localhost/database";

           String url = "jdbc:postgresql//localhost/database";

>          String user = "nobody";
>          String password = "password";
>          Connection con = DriverManager.getConnection(url, user,
> password);
>          Statement stmt = con.createStatement();
> ...
>
> that's all. Please give me a tip. Thank You for the tip!

--
Peter T Mount peter@retep.org.uk or petermount@earthling.net
Main Homepage: http://www.retep.org.uk
************ Someday I may rebuild this signature completely ;-) ************
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Peter T Mount
Дата:
Сообщение: Re: [INTERFACES] Java Transaction
Следующее
От: Constantin Teodorescu
Дата:
Сообщение: Precompiled libraries for PgAccess, Linux RedHat 5.0 i386 and PostgreSQL 6.3.2