You need to load the driver first and then get the connection, also the
url for the connection s/b
jdbc:postgresql://hostname/testuser=testpassword=test
Assuming your database name is test
So your code needs to execute
Class.forName(org.postgresql.Driver)
And then
Connection db =
Then I changed the dbUrl string to:
private static final String dbUrl =
jdbc:postgresql//wetwang.ontko.com/demo;
Any thoughts about what I've done wrong here?
This might not be the only problem, but your URL is missing a colon,
should be:
jdbc:postgresql://wetwang.ontko.com/demo
Title: RE: [JDBC] No suitable driver
Try passing the driver in the command line, like this: java -Djdbc.drivers=org.postgresql.Driver ...
-Original Message-
From: Peter Mezzina [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 15, 2001 2:58 PM
To: [EMAIL PROTECTED]
Subject: [JDBC