資源簡介
利用sql server 2005 +Tomcat+myeclipse 可以自己使用的一個博客系統。有著 后臺管理
注冊 、相冊、上傳文章、友情鏈接等功能
代碼片段和文件信息
package?db;
import?java.sql.*;
public?class?db?{
private?String?dbDriver=“com.microsoft.sqlserver.jdbc.SQLServerDriver“;
?private?String?sConnStr?=?“jdbc:sqlserver://localhost:1433;databasename=jspwuyexns“;?
??public?Connection?connect?=?null;
??public?ResultSet?rs=null;
??public?db()?{
????try?{
?????
??????Class.forName(dbDriver).newInstance();?
?????
??????connect?=?DriverManager.getConnection(sConnStr“sa““123“);?
?????
????}
????catch?(Exception?ex)?{
??????System.out.println(“12121“);
????}
??}
??
??public?ResultSet?executeQuery(String?sql)?{
try{
connect=DriverManager.getConnection(sConnStr“sa““123“);
Statement?stmt=connect.createStatement();
rs=stmt.executeQuery(sql);
}catch(SQLException?ex){
System.err.println(ex.getMessage());
}
return?rs;
}
??public?void?executeUpdate(String?sql)
????{
????
???? Statement?stmt=null;
???? rs=null;
???? try
???? {???connect=DriverManager.getConnection(sConnStr“sa““123“);
???? stmt=connect.createStatement();
???? stmt.executeUpdate(sql);
???? stmt.close();
???? connect.close();
????
????
???? }
???? catch(SQLException?ex)
???? {
???? System.err.println(ex.getMessage());
????
????
???? }
????
????
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-02-25?21:32??jspwuyexns\
?????文件????????3584??2017-02-25?21:32??jspwuyexns\.classpath
?????文件?????????303??2017-02-26?22:17??jspwuyexns\.myme
?????文件????????1753??2017-02-25?21:32??jspwuyexns\.project
?????目錄???????????0??2017-02-25?21:58??jspwuyexns\.settings\
?????文件?????????500??2017-02-25?21:32??jspwuyexns\.settings\.jsdtscope
?????文件??????????74??2017-02-25?21:58??jspwuyexns\.settings\com.genuitec.eclipse.core.prefs
?????文件?????????303??2017-02-25?21:32??jspwuyexns\.settings\org.eclipse.jdt.core.prefs
?????文件?????????468??2017-02-25?21:32??jspwuyexns\.settings\org.eclipse.wst.common.component
?????文件?????????252??2017-02-25?21:32??jspwuyexns\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件??????????49??2017-02-25?21:32??jspwuyexns\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2017-02-25?21:32??jspwuyexns\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????目錄???????????0??2017-02-25?21:31??jspwuyexns\sql2005\
?????文件?????2490368??2016-05-13?20:34??jspwuyexns\sql2005\jspwuyexns_Data.MDF
?????文件?????3932160??2016-05-13?20:34??jspwuyexns\sql2005\jspwuyexns_Log.LDF
?????目錄???????????0??2017-02-25?21:31??jspwuyexns\src\
?????目錄???????????0??2017-02-25?21:31??jspwuyexns\src\db\
?????文件????????1313??2017-02-25?21:58??jspwuyexns\src\db\db.java
?????目錄???????????0??2017-02-26?22:21??jspwuyexns\WebRoot\
?????文件????????1423??2016-03-12?08:23??jspwuyexns\WebRoot\adminyanzheng.jsp
?????文件????????2140??2016-03-11?08:39??jspwuyexns\WebRoot\CSS.css
?????文件?????????995??2016-03-13?12:10??jspwuyexns\WebRoot\databack.jsp
?????文件?????????873??2016-03-06?12:13??jspwuyexns\WebRoot\del.jsp
?????文件?????????943??2016-03-08?13:13??jspwuyexns\WebRoot\delgg.jsp
?????文件????????1583??2017-02-25?22:25??jspwuyexns\WebRoot\down.jsp
?????文件????????1575??2016-03-13?03:41??jspwuyexns\WebRoot\dx.jsp
?????文件????????4048??2017-02-25?22:26??jspwuyexns\WebRoot\dx_detail.jsp
?????文件?????????911??2016-03-11?23:58??jspwuyexns\WebRoot\dx_post.jsp
?????目錄???????????0??2017-02-25?21:32??jspwuyexns\WebRoot\eWebEditor_V4.60\
?????目錄???????????0??2017-02-25?21:31??jspwuyexns\WebRoot\eWebEditor_V4.60\buttonimage\
?????目錄???????????0??2017-02-25?21:31??jspwuyexns\WebRoot\eWebEditor_V4.60\buttonimage\blue\
............此處省略687個文件信息
評論
共有 條評論