From: | poonam talreja <poonammtalreja(at)yahoo(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | suitable driver not found |
Date: | 2004-01-31 10:33:57 |
Message-ID: | 20040131103357.62646.qmail@web41804.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
The code given below gives an exception as:
a suitable driver not found.
I am not working on a network, it is a simple stand alone PC.
Which jdbc driver would be suitable,I am using postgreSQL 7.3,j2sdk1.4.2 and have installed jdbc driver pg73jdbc3.jar
import java.sql.*;
class mycon{
public static void main (String args[]) {
try{
Class.forName("org.postgresql.Driver");
String url="jdbc:postgresql://127.0.0.1:5432/a;
Connection con = DriverManager.getConnection(url, "postgres", "");
}catch(ClassNotFoundException e) {
System.out.println("Exception");
System.out.println(e.toString());
}
catch(SQLException e) {
System.out.println("Exception");
System.out.println(e.toString());
}
}
}
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
From | Date | Subject | |
---|---|---|---|
Next Message | poonam talreja | 2004-01-31 10:53:25 | suitable driver not found |
Previous Message | Kris Jurka | 2004-01-31 08:37:35 | Re: Trigger function aborts the transaction on exception |