更新时间:2023-12-04 17:00:52
大概是下面的代码引起了错误;你得到一个错误吗?您还会在捕获任何异常时消耗任何异常,这对诊断问题没有帮助.
Presumably the error is with the code below; do you get an error? You are also consuming any exceptions when caught, which does not help to diagnose the problem.
query="update table1 set name='' "+name_t.getText()+" '' where id="+id_t.getText()+")";
stat.executeUpdate(query);
您可以使用此代码(针对Google)对SQL注入敞开大门,这有可能损害您的系统.
You are leaving yourself wide open to SQL injection with this code (Google for it), which has the potential to damge your system.