日期:2014-05-20  浏览次数:20657 次

大家好,请帮我看下我的这段代码怎么不能修改数据
conn = dataop.getConn(); stmt = dataop.getStmt(conn); StringBuilder str = new StringBuilder("update topwellcrm.edu_person_info set edu_person_info.mobilePhone = '"+mobilePhone+"' where edu_person_info.username='"+username+"' "); // StringBuilder str_authority = new StringBuilder("select passwd from security_users where username='"+username+"'"); String sql = str.toString(); //System.out.println("打印sql"); rs = stmt.executeQuery(sql);
谢谢大家


------解决方案--------------------
楼主,你要修改代码的话就要用executeUpdate方法,executeQuery是查询数据