Skip site navigation (1) Skip section navigation (2)

Re: [INTERFACES] JDBC driver and postgreSQL

From: Peter T Mount <pgint(at)maidast(dot)demon(dot)co(dot)uk>
To: Agus Mingtarja <mingtarja(at)hdz-ima(dot)rwth-aachen(dot)de>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] JDBC driver and postgreSQL
Date: 1998-05-07 05:54:43
Message-ID: Pine.LNX.3.95.980507065212.3542C-100000@retep.org.uk (view raw or flat)
Thread:
Lists: 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(at)retep(dot)org(dot)uk or petermount(at)earthling(dot)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(at)maidstone(dot)gov(dot)uk


In response to

pgsql-interfaces by date

Next:From: Constantin TeodorescuDate: 1998-05-07 17:25:21
Subject: Precompiled libraries for PgAccess, Linux RedHat 5.0 i386 and PostgreSQL 6.3.2
Previous:From: Peter T MountDate: 1998-05-07 05:51:25
Subject: Re: [INTERFACES] Java Transaction

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group