我面临在 java 编程中编写更新 sql/oracle 命令的问题。我的数据库是甲骨文。我曾尝试过这种方法,但它不起作用。没有更新发生。有人请帮我吗?
conn = ds.getConnection();
String updateQ = "update ANI_999 set First_Name='d.getName()',HouseNo='d.getAddr1()',StreetName='d.getAddr2()',AppartmentSuite='d.getAddr3()',Town_City='d.getTownCity()',State='d.getState()',Postal_Code='d.getPostalCd()',Country='d.getCountry()' where CALLER_ID = 'msisdn'";
stmt = conn.prepareStatement(updateQ);
int result = stmt.executeUpdate(updateQ);
conn.commit();
conn.close();