i have written follwoing code and added jar files ojdbc14.jar but I could not establish the connection.so plz give sol to run this code
giving output:
(in console)
java.sql.SQLException: No suitable driver
package one.sr;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
public class InsertQueryEx {
public static void main(String[] args)throws Exception
{
try{
Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”);
Connection con = DriverManager.getConnection(“jdbc:oracle:thin:@localhost:1521:orcl”,”system”,”oralce10g”);
System.out.println(“CONNECTED”);
Statement stmt=con.createStatement();
System.out.println(“CONNECTED”);
}catch(SQLException e)
{
System.out.println(e);
}
//System.out.println(“CONNECTED”);
}
}