Archive for July 29th, 2007

You are currently browsing the archives of Enabling Technology .

解决MySQL 中文查询 条件问题

public static Connection getConnection() {

        Connection conn = null;
        try {
            Class.forName(”com.mysql.jdbc.Driver”).newInstance();
            conn = DriverManager
                    .getConnection(
                            “jdbc:mysql://server:3306/” +
                            “schema??useUnicode=true&characterEncoding=utf8″,
                            “table”, “passwd”);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return conn;
    }

Posted by micas on Jul 29th 2007 | Filed in SEO | Comments (0)