Howdy, Stranger!

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


JSP Database Connection -> General Error

MartynMartyn Member Posts: 1
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( )
out.println( res.getString( "pst_Name" ) );
} %>


Sign In or Register to comment.