Oracle Problem

Souvik Basak <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <[email protected]>
Hi,
   I have installed Oracle 9i in my machine. I'm using WindowsNT with
SP6. I have put classes111.zip in CLASSPATH variable. The folowing code

  import java.sql.*;


public class TestSQL {
    public static void main (String [] a){
        try {
            Class.forName("oracle.jdbc.driver.OracleDriver");
             System.out.println("Driver loaded");
            Connection con =
DriverManager.getConnection("jdbc:oracle:thin:127.0.0.1@1521:sid","usern
ame","password");
            System.out.println("Connection Created");
            Statement stmt = con.createStatement();
            System.out.println("System created");
            ResultSet rs = stmt.executeQuery("Select * from tab;");
            System.out.println("Query Executed");
            while(rs.next()){
                     System.out.println(rs.getString("TNAME"));
            }
            stmt.close();
            con.close();
        }catch (Exception ex){
              ex.printStackTrace();
         }
    }
}


gives
Driver loaded
java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at TestSQL.main(TestSQL.java:8)


please help.
-- Souvik Basak
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.