gpt4 book ai didi

java - 更新查询不起作用 oracle 和 jsp

转载 作者:行者123 更新时间:2023-12-02 05:06:54 25 4
gpt4 key购买 nike

大家好

我的更新查询不起作用。并且没有任何异常(exception)我的代码;

String sorgu = "update KISI set unvani=?, gorevi=?,"
+ "firma=?,adres=?,tel=?,"
+ "fax=?,gsm=?,mail=?,"
+ "web=? where kisi_id=?";

try {
System.out.println("get adressss "+guncelleForm.getAdres());
System.out.println("get ünvan "+guncelleForm.getUnvani());
conn = VTU.baglantiAl();
pst = conn.prepareStatement(sorgu);
pst.setString(1, guncelleForm.getUnvani());
pst.setString(2, guncelleForm.getGorevi());
pst.setString(3, guncelleForm.getFirma());
pst.setString(4, guncelleForm.getAdres());
pst.setString(5, guncelleForm.getTel());
pst.setString(6, guncelleForm.getFax());
pst.setString(7, guncelleForm.getGsm());
pst.setString(8, guncelleForm.getMail());
pst.setString(9, guncelleForm.getWeb());
pst.setString(10, guncelleForm.getId());

pst.executeUpdate();
}

我不明白是什么问题。我用的是甲骨文。我可以使用 println() 查看值,它也不为空。 guncelleForm 仅具有 get/set谢谢你所做的一切

最佳答案

请注意 guncelleForm.getId() 是否等于 KISI 中的 kisi_id 之一?可能是您的实例 guncelleForm 未按预期初始化。

请记住,= NULL(与NULL比较)始终为假!

关于java - 更新查询不起作用 oracle 和 jsp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27706819/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com