Skip site navigation (1) Skip section navigation (2)

suitable driver not found

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 (view raw or flat)
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!

Responses

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2004-01-31 11:06:58
Subject: Re: suitable driver not found
Previous:From: poonam talrejaDate: 2004-01-31 10:33:57
Subject: suitable driver not found

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group