gani

Greenhorn
+ Follow
since May 31, 2002
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by gani

Hello Following is the error I am getting when I compile the code below:
import java.sql.*;
class JdbcTest {
public static void main (String args []) throws SQLException {
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection("jdbc racle ci8:@lmtest", "gani", "babu");
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("select sname from students");
while (rset.next ())
System.out.println (rset.getString (1));
}
}
error
--------------------------
JdbcTest.java:5: Exception java.lang.ClassNotFoundException must be caught, or it must be declared in the throws clause of this method.
Class.forName("oracle.jdbc.driver.OracleDriver");

Pls help me if you have any suggestions.
Thanks
Gani