Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
updatedb_parentcode.jsp
Package: JSP-OA.rar [view]
Upload User: jhtang88
Upload Date: 2014-01-27
Package Size: 28528k
Code Size: 1k
Category:
Jsp/Servlet
Development Platform:
Java
- <%@ page contentType="text/html; charset=utf-8" %>
- <%@ page import="cn.js.fan.security.*"%>
- <%@ page import="cn.js.fan.util.*"%>
- <%@ page import="cn.js.fan.db.*"%>
- <%@ page import="java.sql.*"%>
- <%@ page import="cn.js.fan.web.*"%>
- <%@ page import="com.fan.redmoon.Privilege"%>
- <%@ page import="cn.js.fan.module.cms.*"%>
- <%@ page import="java.util.Calendar" %>
- <%
- Conn conn = new Conn("redmoon");
- Conn conn1 = new Conn("redmoon");
- ResultSet rs = null;
- try {
- String sql = "select id,class1 from document";
- rs = conn.executeQuery(sql);
- while(rs.next()) {
- int id = rs.getInt(1);
- String dirCode = rs.getString(2);
- Leaf lf = new Leaf();
- lf = lf.getLeaf(dirCode);
- String parent_code = lf.getParentCode();
- String query = "update document set parent_code=" + StrUtil.sqlstr(parent_code)
- + " where id=" + id;
- conn1.executeUpdate(query);
- }
- }
- catch (SQLException e) {
- System.out.println(e.getMessage());
- }
- finally {
- if (rs!=null) {
- rs.close();
- rs = null;
- }
- if (conn!=null) {
- conn.close(); conn = null;
- }
- if (conn1!=null) {
- conn1.close(); conn1 = null;
- }
- }
- out.print("操作完成!");
- %>