資源簡介
期末課程設計 JSP+SERVLET+JDBC 企業級JAVA I 源代碼 MYECLIPSE MYSQL

代碼片段和文件信息
package?com.cn.car;
import?java.sql.Connection;
import?java.sql.PreparedStatement;
import?java.sql.ResultSet;
import?com.cn.jdbc.JDBC_Connection;
public?class?AddCar?{
public?void?addCar(CarsVo?carsVo){
Connection?conn?=?null;
PreparedStatement?pstm?=?null;
ResultSet?rs?=?null;
try?{
//調用JDBC_Connection類的getConnection方法連接數據庫
conn?=?JDBC_Connection.getConnection();
//添加數據的sql語句
String?sql?=?
“insert?into?cars(carnumbercartypecolorpricerentpricedepositisrentingdescription)?values(????????)“;
pstm?=?conn.prepareStatement(sql);
pstm.setString(1?carsVo.getCarnumber());
pstm.setString(2?carsVo.getCartype());
pstm.setString(3?carsVo.getColor());
pstm.setDouble(4?carsVo.getPrice());
pstm.setDouble(5?carsVo.getRentprice());
pstm.setDouble(6?carsVo.getDeposit());
pstm.setInt(7?carsVo.getIsrenting());
pstm.setString(8?carsVo.getDescription());
pstm.executeUpdate();//提交pstm對象
System.out.println(“添加成功!添加的內容如下:“);
System.out.println();
}?catch?(Exception?e)?{
e.printStackTrace();
}?finally?{
JDBC_Connection.free(rs?conn?pstm);
}
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????594??2010-05-31?15:00??汽車租賃系統\auto_lease\.classpath
?????文件????????303??2010-05-31?15:00??汽車租賃系統\auto_lease\.myme
?????文件???????1228??2010-05-31?15:00??汽車租賃系統\auto_lease\.project
?????文件????????796??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\adm_index.html
?????文件???????3155??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\adm_menu.html
?????文件????????344??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\error.html
?????文件????????342??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\footer.html
?????文件????????336??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\header.html
?????文件???????1132??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\index.html
?????文件???????1141??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\index.html.bak
?????文件????????241??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\index.jsp
?????文件????????334??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\ok.html
?????文件????????316??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\welcome.html
?????文件?????????39??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\me
?????文件???????7519??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\web.xm
?????文件???????1937??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\car\AddCar.class
?????文件???????2416??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\car\AddCarServlet.class
?????文件???????2089??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\car\CarsVo.class
?????文件???????1259??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\car\DeleteCar.class
?????文件???????1825??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\car\DeleteCarServet.class
?????文件???????2011??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\car\QueryById.class
?????文件???????2299??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\car\QueryByIdServlet.class
?????文件???????3535??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\car\ShowCars.class
?????文件???????2308??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\car\ShowCarsServlet.class
?????文件???????1738??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\car\UpdateCar.class
?????文件???????2530??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\car\UpdateCarServlet.class
?????文件???????1910??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\customers\AddCustomers.class
?????文件???????2374??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\customers\AddCustomersServlet.class
?????文件???????1178??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\customers\DeleteCustomer.class
?????文件???????1749??2010-05-31?15:00??汽車租賃系統\auto_lease\WebRoot\WEB-INF\classes\com\cn\customers\DeleteCustomerServlet.class
............此處省略333個文件信息
評論
共有 條評論