ClassNotFoundException in class.forName()
Hi,
Iam using eclipse and iam trying to load the driver with class.forName().Iam using MySql and i included the mysql-connector-java-5.0.5-bin.jar
where the Driver class is.But iam getting the exception as
Exception caughtjava.lang.ClassNotFoundException: com.mysql.jdbc.Driver
and my code is :
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:odbc:venkat");
PreparedStatement pst=con.prepareStatement("insert into login values(?,?) ");
pst.setString(1,name);
pst.setString(2,id);
int n=pst.executeUpdate();
System.out.println(n+ "rows inserted");
Could anybody help me in clear this error.Thanks in advance
Regards,
Venkatesh.R

