資源簡(jiǎn)介
適用于本科計(jì)算機(jī)專業(yè)畢業(yè)設(shè)計(jì)項(xiàng)目,保證功能齊全,沒有任何bug,也是俺花錢專門找人定做的,然后畢業(yè)論文(設(shè)計(jì))評(píng)分為優(yōu)秀,現(xiàn)在共享給大家,不喜勿噴,謝謝!

代碼片段和文件信息
package?db;
import?java.sql.*;
public?class?db?{
private?String?dbDriver=“com.mysql.jdbc.Driver“;
?private?String?sConnStr?=?“jdbc:mysql://localhost:3306/jspyydzbadzkf64mysql?useUnicode=true&characterEncoding=gbk“;?
??public?Connection?connect?=?null;
??public?ResultSet?rs=null;
??public?db()?{
????try?{
?????
??????Class.forName(dbDriver).newInstance();?
?????
??????connect?=?DriverManager.getConnection(sConnStr“root““8888“);?
?????
????}
????catch?(Exception?ex)?{
??????System.out.println(“12121“);
????}
??}
??
??public?ResultSet?executeQuery(String?sql)?{
try{
connect=DriverManager.getConnection(sConnStr“root““8888“);
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“root““8888“);
???? stmt=connect.createStatement();
???? stmt.executeUpdate(sql);
???? stmt.close();
???? connect.close();
????
????
???? }
???? catch(SQLException?ex)
???? {
???? System.err.println(ex.getMessage());
????
????
???? }
????
????
????}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????5887??2013-05-22?23:10??databa
?????目錄??????????0??2013-05-22?17:22??databa
-----------?---------??----------?-----??----
?????????????????5887????????????????????2
評(píng)論
共有 條評(píng)論