//執行Sql語句,呼叫Jodb類別的execute方法 rst=Jodb.execute("select * from gbook"); %>
<%
int startRowNum; int pageSize=10; rst.last(); int rowCount=rst.getRow(); int pageCount=(rowCount+pageSize-1)/pageSize; int intPage; String strPage=request.getParameter("page"); if(strPage==null) { intPage=1; } else { intPage=java.lang.Integer.parseInt(strPage); if(intPage<1)intPage=1; if(intPage>pageCount)intPage=pageCount; } startRowNum=(intPage-1)*pageSize+1; %>
public class Jodb { public String sdbdriver="sun.jdbc.odbc.JdbcOdbcDriver"; public String sConnStr; public long count; String uid; String pwd; Connection conn=null; ResultSet rs=null;
public String[] split(String str,String strIn) { char[] temp_array; temp_array=str.toCharArray(); int strLength=str.length(); int strInLength=strIn.length(); int strInTimes=0; int strIndex[]=new int[strLength];