public static String DuStatusinactiveanddeactive(EmpBean empBeanObj,
ClaimDetailsBean claimDetailsBean,
HttpServletRequest request) throws SQLException {
// To get Employee Details from cdm master
String query = "update GEMS_DELIVERY_UNIT set isActive=? , TRANS_USER=? where DU_ID=?";
Connection conn = null;
conn = DAO.getMsSqlConnection();
PreparedStatement stmt = null;
//System.out.println("came into upgradeClaim"+beanObj.getAppr1Id()+"-->"+beanObj.getAppr2Id()+"-->"+beanObj.getAwaitingAppr()+"-->"+beanObj.getClaimStatus()+"-->"+beanObj.getClaimId());
try{
stmt = (PreparedStatement) conn.prepareStatement(query);
stmt.setString(1,claimDetailsBean.getDustatus());
System.out.println("ss"+claimDetailsBean.getDustatus());
stmt.setString(2,empBeanObj.getEmpId());
System.out.println("emp"+empBeanObj.getEmpId());
stmt.setString(3,claimDetailsBean.getDucode());
System.out.println("ducode"+claimDetailsBean.getDucode());
//where du_id=arr[0];
System.out.println(query);
stmt.executeUpdate();
}catch(Exception e){
e.printStackTrace();
return "fail";
}
return "Success";
}
现在 stmt.setString(3,claimDetailsBean.getDucode()); 从操作方法 value#1 获得价值我需要拆分这个(value#1)并只更新查询值。我不想要#1如何拆分和更新请任何人帮助???