| 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:53:25 |
| Message-ID: | 20040131105325.37758.qmail@web41801.mail.yahoo.com |
| Views: | Whole Thread | Raw Message | 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 | Kris Jurka | 2004-01-31 11:06:58 | Re: suitable driver not found |
| Previous Message | poonam talreja | 2004-01-31 10:33:57 | suitable driver not found |