Domino与jdbc连接,update更新失败的问题!!急!加急!
Statement stmt = conn.createStatement();
String rq = thisDoc.getItemValueString("flddate");
String[] chrrq = rq.split(";");
String cbzx = thisDoc.getItemValueString("fldcbzx");
String[] chrcbzx = cbzx.split(";");
String fylx = thisDoc.getItemValueString("fldfylb");
String[] chrfylx = fylx.split(";");
String je = thisDoc.getItemValueString("fldMoney");
String[] chrje = je.split(";");
chrrq[0] = "2013";
int i;
int strresult = 0;
for(i=0;i<chrrq.length;i++){
sql = "Select nd,cbzx,fylb,yse,fse,ye from fykz where (cbzx='" + chrcbzx[i] +"' and fylb='"+ chrfylx[i] +"' and nd='"+chrrq[0]+"')";
ResultSet rs = stmt.executeQuery(sql);
if(rs.next()){
strresult = (int) (Integer.parseInt(chrje[i]) + (rs.getDouble("fse")));
DecimalFormat df = new DecimalFormat("0.00"); //格式化小数,不足的补0
String filesize = df.format(strresult); //返回的是String类型的
sql2 = "Update fykz Set fse = "+ filesize + " Where (cbzx='" + chrcbzx[i] + "' and fylb='"+ chrfylx[i] +"' and nd='" + chrrq[0]+"')";
stmt.executeUpdate(sql2);
System.out.print(stmt.executeUpdate(sql2));
}
}
这是部分代码,我想问的是,System.out.print(stmt.executeUpdate(sql2))这个在服务器控制台输出的值为1,代表已成功更新了一条数据,可在asp.net系统中查看,那个值根本没更新过来。
请问我的上述代码是不是有什么问题还是怎么啦???希望对java代理比较熟悉的高手能些答复,急急急急急!!!!!
------最佳解决方案--------------------lz 转到响应的java版看看吧。
------其他解决方案--------------------问题已解决..