Hello,

I keep getting the same error message every time that I load my servlet
and try to connect to the database -
"Servlet Error: java.lang.InstantiationError: org/gjt/mm/mysql/Statement



I know that my connection isn't null and the classpath is set correctly
in jserv.properties; I just can't figure out why it won't create a
statement. If anyone could help that would be great., I have included
the little bit of code surrounding my troubled code

try
     {
    //load driver and make connection
  Class.forName(driverName).newInstance();
  connection = DriverManager.getConnection(databaseUrl, username,
password);

  //create statement
  stmt = connection.createStatement();

  //get result set
  result = stmt.executeQuery(sql);

  //close connection
  connection.close();

 }catch(Exception e){
     e.printStackTrace();
 }


Thanks,
Sheri




--
----------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to