给个bean
public ResultSet execQueryPage(String table,String field,String condition,int p)
{
String sql0=null;
try{
conn=DriverManager.getConnection(url,uid,pwd);
Statement stmt=conn.createStatement();
//start=(p-1)*pagesize;
//sql0=sql+" limit "+start+", "+pagesize;
sql0="select top "+pagesize+" "+field+" from "+table+" where "+condition+" and id not in (select top "+((p-1)*pagesize)+" id from "+table+" where "+condition+" order by id desc) order by id desc";
rs=stmt.executeQuery(sql0);
}
500 Servlet Exception
Note: sun.tools.javac.Main has been deprecated.
/loupan/4.jsp:71: Method last() not found in class java.lang.String.
sqlRst.last();
^
/loupan/4.jsp:73: Method getRow() not found in class java.lang.String.
intRowCount = sqlRst.getRow();
^
/loupan/4.jsp:129: Method absolute(int) not found in class java.lang.String.
sqlRst.absolute((intPage-1) * intPageSize + 1);
^
/loupan/4.jsp:135: Method isAfterLast() not found in class java.lang.String.
while(i<intPageSize && !sqlRst.isAfterLast()){
^
/loupan/4.jsp:149: Method getString(int) not found in class java.lang.String.
out.print((sqlRst.getString(2)));
^
/loupan/4.jsp:151: Method getString(int) not found in class java.lang.String.
out.print((sqlRst.getString(3)));
^
/loupan/4.jsp:153: Method getString(int) not found in class java.lang.String.
out.print((sqlRst.getString(4)));
^
/loupan/4.jsp:155: Method getString(int) not found in class java.lang.String.
out.print((sqlRst.getString(5)));
^
/loupan/4.jsp:158: Method next() not found in class java.lang.String.
sqlRst.next();
^
/loupan/4.jsp:184: Method close() not found in class java.lang.String.
sqlRst.close();
^
10 errors, 1 warning
--------------------------------------------------------------------------------
Resin 2.1.4 (built Fri Aug 2 14:16:52 PDT 2002)