資源簡介
jsp音樂網站源代碼 javaBean 技術

代碼片段和文件信息
package?com.jspdev.ch13;
import?java.util.*;
import?java.sql.*;
public?class?ContactBean
{
private?Connection?conn;
private String?CLASSFORNAME=“sun.jdbc.odbc.JdbcOdbcDriver“;
private String?SERVANDDB=“jdbc:odbc:MyMusicSource“;
private String?USER=“sa“;
private String?PWD=““;
Vector?v;
public?ContactBean()throws?Exception
{
v=new?Vector();
}
public?int?getAvailableCount()throws?Exception
{
int?ret=0;
Class.forName(CLASSFORNAME);
conn?=?DriverManager.getConnection(SERVANDDBUSERPWD);
Statement?stmt=conn.createStatement();
String?strSql=“select?count(*)?from?Message_Info“;
ResultSet?rset=stmt.executeQuery(strSql);
while(rset.next())
{
ret=rset.getInt(1);
}
return?ret;
}
public?PageBean?listData(String?page)throws?Exception
{
try
{
PageBean?pageBean=new?PageBean(this);
int?pageNum=Integer.parseInt(page);
Statement?stmt=conn.createStatement();
String?strSql=“select?top?“+pageNum*pageBean.rowsPerPage+“?*?from?Message_Info?order?by?riqi“;
ResultSet?rset=stmt.executeQuery(strSql);
int?i=0;
while(rset.next())
{
if(i>(pageNum-1)*pageBean.rowsPerPage-1)
{
object[]?obj=new?object[6];
obj[0]=rset.getString(“custname“);
obj[1]=rset.getString(“riqi“);
obj[2]=rset.getString(“title“);
obj[3]=rset.getString(“resource“);
obj[4]=rset.getDate(“restored“);
v.add(obj);
}
i++;
}
rset.close();
stmt.close();
pageBean.curPage=pageNum;
pageBean.data=v;
return?pageBean;
}
catch(Exception?e)
{
??? e.printStackTrace();
throw?e;
}
}
public?Vector?getResult()throws?Exception
{
return?v;
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1668??2006-11-07?16:31??13章音樂網站\com\music\account_customer.jsp
?????文件???????5591??2006-11-07?16:45??13章音樂網站\com\music\account_edit.jsp
?????文件???????4212??2006-11-07?17:01??13章音樂網站\com\music\account_guestbook.jsp
?????文件???????4536??2006-11-07?20:43??13章音樂網站\com\music\account_history.jsp
?????文件???????1571??2006-11-07?16:31??13章音樂網站\com\music\account_pass.jsp
?????文件???????2504??2006-11-07?16:46??13章音樂網站\com\music\account_password.jsp
?????文件???????1527??2006-11-07?16:32??13章音樂網站\com\music\addlist.jsp
?????文件???????2593??2006-11-07?16:47??13章音樂網站\com\music\add_guestbook.jsp
?????文件???????1088??2006-11-07?16:31??13章音樂網站\com\music\add_message.jsp
?????文件???????1122??2006-11-09?21:08??13章音樂網站\com\music\admin\checklogin.jsp
?????文件????????330??2006-11-09?21:01??13章音樂網站\com\music\admin\error.jsp
?????文件????????255??2006-11-09?21:02??13章音樂網站\com\music\admin\errorpage.jsp
?????文件???????1683??2003-09-06?17:39??13章音樂網站\com\music\admin\hellking.css
?????文件????????383??2006-10-26?20:41??13章音樂網站\com\music\admin\include.inc
?????文件????????665??2006-11-09?20:44??13章音樂網站\com\music\admin\index.jsp
?????文件????????219??2003-09-29?23:19??13章音樂網站\com\music\admin\jstl.inc
?????文件???????1300??2006-11-09?20:21??13章音樂網站\com\music\admin\login.jsp
?????文件????????614??2006-11-09?20:49??13章音樂網站\com\music\admin\main.jsp
?????文件???????2343??2006-11-11?13:01??13章音樂網站\com\music\admin\menu.jsp
?????文件???????2576??2006-11-11?13:03??13章音樂網站\com\music\admin\order\allorder.jsp
?????文件????????732??2006-11-09?21:02??13章音樂網站\com\music\admin\order\deleteOrder_do.jsp
?????文件???????1770??2006-11-11?13:03??13章音樂網站\com\music\admin\order\orderdetail.jsp
?????文件????????955??2006-11-09?21:04??13章音樂網站\com\music\admin\singer\checkname.jsp
?????文件????????924??2006-11-09?21:04??13章音樂網站\com\music\admin\singer\deletesinger.jsp
?????文件???????1535??2006-11-09?21:04??13章音樂網站\com\music\admin\singer\regist.jsp
?????文件???????1945??2006-11-11?13:04??13章音樂網站\com\music\admin\singer\registersinger.jsp
?????文件???????1223??2006-11-11?13:03??13章音樂網站\com\music\admin\singer\updata.jsp
?????文件???????2451??2006-11-11?13:03??13章音樂網站\com\music\admin\singer\updatasinger.jsp
?????文件???????1072??2006-11-09?21:03??13章音樂網站\com\music\admin\singer\upload.jsp
?????文件???????1706??2006-11-11?13:03??13章音樂網站\com\music\admin\singer\viewAllsinger.jsp
............此處省略273個文件信息
評論
共有 條評論