• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class connection not found

 
L. Riley
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to display records from a Cloudscape database. When my page tries to display I get an error message that ends with 61: Class connection not found.
I have checked my classpath and I am not sure where to look from here...
Will someone give me a hint what might be wrong here?
Thank you.
 
Lee Wallen
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
make sure that you import java.sql.* or java.sql.Connection.
import java.sql.*;
public class TestConn {
public static void main (String args []) {
try {
String dbUrl = args[0];
String driverName = args[1];

Class.forName(driverName).newInstance();
Connection con =
DriverManager.getConnection(dbUrl, "", "");
System.out.println("conn.isClosed = " + conn.isClosed());
} catch (Exception e) {
e.printStackTrace();
}
}
}
[This message has been edited by Lee Wallen (edited July 15, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic