JSP implementation tree structure (5) -- delete Department page orgDelete. jsp

Source: Internet
Author: User
// OrgDelete. jsp deletes the department page, which is from orgManage. jsp.
<% @ Page contentType = "text/html; charset = Big5" %>
<% @ Include file = "orgConnInclude. jsp" %>
<% @ Page import = "javax. SQL. *" %>
<%
Request. setCharacterEncoding ("big5 ");
String depName = request. getParameter ("name ");
// Out. println (depName + "<br> ");
String message = null;
Boolean autoCommit = conn. getAutoCommit ();
String query1 = "select total" +
"From ngb_org" +
"Where name = '" + depName + "'";
String query2 = "select *" +
"From ngb_org" +
"Where total like? ";
String delete = "delete from ngb_org" +
"Where total like? ";
String delete1 = "delete from ngb_org" +
"Where name =? ";
String temp1 = null;
String temp1a = null;
String temp1aa = null;
String temp1b = null;
Try {
Conn. setAutoCommit (false );
PreparedStatement ps = conn. prepareStatement (query1 );
ResultSet rs1+ps.exe cuteQuery ();
While (rs1.next ())
{Temp1 = rs1.getString ("total ");}
// Out. println (temp1 );
Temp1a = temp1.substring (0, 1 );
Temp1aa = temp1.substring (0, 3 );
Temp1b = temp1.substring (3, 6 );
// Out. println (temp1b );
/*
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.