From: | Ulf Mehlig <umehlig(at)uni-bremen(dot)de> |
---|---|
To: | mitlas(at)auricvision(dot)com |
Cc: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: [GENERAL] PostgreSQL and WWW |
Date: | 1998-11-29 08:04:51 |
Message-ID: | 199811290804.JAA01785@uni-bremen.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Dmitry Iv Popov <mitlas(at)auricvision(dot)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(at)zmt(dot)uni-bremen(dot)de>
%%%%!%%% Projekt "MADAM" <umehlig(at)uni-bremen(dot)de>
%%%% %!% %%%% ----------------------------------------------------
---| %%% MADAM: MAngrove | Center for Tropical Marine
||--%!% Dynamics | Biology
|| And | Fahrenheitstrasse 1
_ /||\_/\_ Management |
/ / \ \ ~~~~~~~~~~~~~~~~~ | 28359 Bremen/Germany
~~~~~~~~~~~~~~~~~~~~
From | Date | Subject | |
---|---|---|---|
Next Message | Herouth Maoz | 1998-11-29 10:08:31 | Re: [GENERAL] equivalent of sqlload? |
Previous Message | Colin Smith | 1998-11-28 21:41:55 | pgsql-general |