解决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;
    }

相关帖子:
  • No Related Posts
  • micas Jul 29th 2007 04:23 pm SEO No Comments yet Trackback URI Comments RSS

    Leave a Reply

    You must be logged in to post a comment.