连接都没问题,
为什么
String updateStr="update infom set ip="+ipStr+"where id="+idstring; 
stmt.executeUpdate(updateStr);
就会出现异常:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'id=1001' at line 1
这里的id是字符串
谢谢大家