public static int check(String name, String pass) {
        int result=1;       //У
        String rightName=null,rightPass=null;
        ResultSet rs;
        String sql="select * from User";        //ݿ
        DB.open();
        rs=DB.sqlQuery(sql);

        try {                   //ݿ洢û
            while (rs.next()){
                rightName=rs.getString("Name");
                rightPass=rs.getString("Pass");

            }
        } catch (SQLException e) {
            e.printStackTrace();
        }

        if(rightName.equals(name)&&rightPass.equals(pass))
            result=1;   //Уɹ1
        else
            result=0;   //Уʧܷ2

        DB.close();     //رݿ
        return result;
    }