deleteClientCheck
<%@page import="java.sql.*"%>
<%@page contentType="text/html" pageEncoding="gbk"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<title>处理客户删除数据</title>
</head>
<body>
<%
String clientName=new String(request.getParameter("clientName").getBytes("ISO-8859-1"),"gbk");
Connection con=null;
Statement st=null;
try{
Class.forName("com.mysql.jdbc.Driver");
String url="jdbc:mysql://localhost:3306/eims?useUnicode=true&characterEncoding=gbk";
con=DriverManager.getConnection(url,"root","21328");
st=con.createStatement();
String sql="delete from client where clientName='"+clientName+"'";
st.executeUpdate(sql);
response.sendRedirect("http://localhost:8080/EIMS/clientManage/lookClient.jsp");
}
catch (Exception e){
e.printStackTrace();
}
finally{
st.close();
con.close();
}
%>
</body>
</html>