Re: [GENERAL] PostgreSQL and WWW - Mailing list pgsql-general

From Ulf Mehlig
Subject Re: [GENERAL] PostgreSQL and WWW
Date
Msg-id 199811290804.JAA01785@uni-bremen.de
Whole thread Raw
In response to PostgreSQL and WWW  (Dmitry Iv Popov <mitlas@auricvision.com>)
List pgsql-general
Dmitry Iv Popov <mitlas@auricvision.com> wrote:

 > how do I make my DB accessible from the Web (via JDBC)?  With what
 > parameters should I call 'Class.forName()' and
 > 'DriverManager.getConnection()' in case of PostgreSQL?

The following is quoted from

  ".../pgsql/src/interfaces/jdbc/example/basic.java":

    // Load the driver
    Class.forName("postgresql.Driver");

    // Connect to database
    System.out.println("Connecting to Database URL = " + url);
    db = DriverManager.getConnection(url, usr, pwd);

`url' could be "localhost:postgresql:rscexamdb", e.g. If your program
can't find the driver class, you maybe have forgotten to put it into
the CLASSPATH:

   declare -x CLASSPATH=$CLASSPATH:./:/usr/local/lib/java/postgresql.jar

(or equivalents, depends on your shell; valid only, if file
"postgresql.jar" is in "/usr/local/lib/java", of course).

In the jdbc driver directory (".../src/interfaces/jdbc", see above)
you'll find a README telling you something about building, installing
and using the driver.

Hope it helps,
Ulf

P.S.:

 > P.S.: you can write me in russian - it's my native lang. :)

unfortunately not mine ;-)

--
======================================================================
 %%%%%            Ulf Mehlig              <umehlig@zmt.uni-bremen.de>
   %%%%!%%%       Projekt "MADAM"         <umehlig@uni-bremen.de>
%%%% %!% %%%%     ----------------------------------------------------
 ---| %%%         MADAM:  MAngrove    |  Center for Tropical Marine
    ||--%!%              Dynamics     |  Biology
    ||                  And           |  Fahrenheitstrasse 1
 _ /||\_/\_            Management     |
/  /    \  \ ~~~~~~~~~~~~~~~~~        |  28359 Bremen/Germany
  ~~~~~~~~~~~~~~~~~~~~

pgsql-general by date:

Previous
From: Colin Smith
Date:
Subject: pgsql-general
Next
From: Herouth Maoz
Date:
Subject: Re: [GENERAL] equivalent of sqlload?