文档介绍:×÷Õߣºjavaboy
ÈÕÆÚ£º2001-4-10 15:31:31
import .*;
import .*;
import .*;
public class bandlistBean {
private String driver;
private String dbURL;
private Bean2 b=new Bean2();
public bandlistBean(){
globalBean globalstr = new globalBean();
driver = ();
dbURL = ();
}
public String getKey(String href,int recordPerPage,int startRecord) {
Connection conn = null;
QueryDataSet dSet = null;
String shortkeystr ="";
try{
(driver).newInstance();
conn=(dbURL);
String countsql = "Select count(*) as count from TABLE where yijlmbm=1 and riq=to_char(sysdate,'yyyymmdd')";
dSet = new QueryDataSet(conn,countsql);
();
Record countRecord = (0);
int dSetAllSize = ("count").asInt();
int pages = dSetAllSize/recordPerPage;
if(dSetAllSize%recordPerPage !=0) pages++;
for(int i=0;i<pages;i++) {
if(startRecord == i*recordPerPage) {
shortkeystr = shortkeystr + "<Font size=+1>"; // ±»Ñ¡ÖÐÒ³Êý×Ö×ÖÌåÔö´ó
shortkeystr = shortkeystr + href + "?startRecord=" + (i*recordPerPage) + ">";
shortkeystr = shortkeystr + (i+1) + "</a></Font>" + "\n";
}else {
shortkeystr = shortkeystr + href + "?startRecord=" + (i*recordPerPage) + ">";
shortkeystr = shortkeystr + (i+1