I still don't know what causes the problem. I had the same codes in a stand
alone java program and compiled the program at DOS prompt successfully. Then
why tomcat gave me the error?
Jack
-----Original Message-----
From: Jack Li [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 20, 2001 12:33 PM
To: [EMAIL PROTECTED]
Subject: How to get rs.last() supported by Tomcat
My problem is to make some JDBC 2.0 API calls such as rs.last(). I have
Tomcat 3.2.1 and JDK 1.3 installed. Source codes are below. Please help.
Jack Li
-----------------------------------------
<%@ page import="java.sql.*"%>
<%
Connection con = null;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:internetdb", "", "");
Statement st =
con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
ResultSet rs = st.executeQuery("Select * from HRExt");
rs.last();
out.println(rs.getRow());
rs.close();
con.close();
}
catch(SQLException e){
System.err.println(e.getMessage());
}
catch(Exception e){
System.err.println(e.getMessage());
}
out.println("Hello World");
%>
---------------------------------------------