MySQL Driver Class Not Found
MySQL Driver Set Up problems - Class Not Found error
====================================================
I have recently begun conversion of a working Java + MS Access application to Java + MySQL. I get a Class Not Found error trying to set up the driver. I am using MySQL Connection/J 3.0.8.
I have read multiple forum entries as well as the ReadMe in the Connection/J installation and also Mark Matthews web site installation and programming info. I have made many tries to get the code to work.
But I cannot get past the Class Not Found error when trying to set up the DB Driver.
I copied the JAR file "mysql-connector-java-3.0.8-stable-bin.jar" into the Java folder \jdk1.3.1_06\jre. That folder is in my class path.
Got Class Not Found.
Added the file name explicitly in the classpath. Still error.
Tried "com.mysql.jdbc.Driver" as Class.forName. Error.
Tried "org.gjt.mm.mysql.Driver" as Class.forName. Error.
I can't seem to find the correct combination. Help?
Thanks, WBARBEE2
================
Current code is:
SQLDBClass = "com.mysql.jdbc.Driver";
SQLDBName = "jdbc:mysql://localhost/RescForSrs";
--
System.out.println("Load DBClass " + SQLDBClass);
try {
Class.forName(SQLDBClass).newInstance();
}
catch (Exception e)
{
*****Error here*****
ErrMsg = "Error loading JDBC.ODBC Driver";
(display)
return;
}
System.out.println("Set connect " + SQLDBName);
try {
UserConn = DriverManager.getConnection(SQLDBName);
UserRead = UserConn.createStatement();
}
catch (Exception e)
{
ErrMsg = "Error JDBC Connection";
(display)
return;
}

