JSP Database Connection -> General Error

What am I doing wrong when I execute this on an Apache Tomcat 4.1.18 server with default settings (port 8080) running on Windows 2000 SP3. The Persons database is a MS Access 2000 database, system DSN, driver version 4.xx.

Tomcat returns a "General Error" (??)

Description: The server encountered an internal error () that prevented it from fulfilling this request.


<% String url = "jdbc:odbc:Persons";
String username = "";
String password = "";
Connection connection;
PreparedStatement sql;
ResultSet res;

Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
connection = DriverManager.getConnection( url, username, password );
sql = connection.prepareStatement( "SELECT * FROM t_Person_Type" );
res = sql.executeQuery();

while( res.next() )
out.println( res.getString( "pst_Name" ) );
} %>


  • Try setting the connection object to null. i can't find another problem.

    Hope it helps.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion