<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="java.sql.*" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.database.*" %>
<%@ page import="net.sz600.system.SzProperties" %>
<%@ page import="net.sz600.system.SzLevelNumber" %>
<%@ page import="net.sz600.system.SzPageHelp" %>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<%
    String sDriver = "org.gjt.mm.mysql.Driver";
    String sUrl = "jdbc:mysql://localhost:3306/SZ_OA?useUnicode=true&characterEncoding=latin1";
    String sUser = "root";
    String sPassword = "";

    Connection conn = null;
    PreparedStatement pstmt = null;
    Statement stmt = null;
    ResultSet rs = null;
    String s = "中文测试";
    s = new String(s.getBytes("GBK"),"latin1");
    StringBuffer sb = new StringBuffer(" update test set TEST='");
    sb.append(s);
    sb.append("'");
    String sql = sb.toString();
    sb = null;
    try {
    	Class.forName(sDriver);
    	conn = DriverManager.getConnection(sUrl, sUser, sPassword);
	stmt=conn.createStatement();
    	stmt.execute(sql);
    } catch(Exception e) { 
		out.println("连接客户信息数据库有问题<p>");
		out.println("URL: " + sUrl + "<BR>");
		out.println("User: " + sUser + "<BR>");
//		out.println("Password: ********<BR>");
		if (pstmt != null) {
			pstmt.close();
			pstmt = null;
		}
		if (conn != null) {
			conn.close();
			conn = null;
		} 
		return;
    }
%>
