c= Connect(); String sql = "select * from guanliyuan where name=? and password=?"; pst = c.prepareStatement(sql); //st=c.createStatement(); pst.setString(1, tt); pst.setString(2, pp); rs = pst.executeQuery();