Domino与jdbc连接,update更新失败的问题!!急!加急!

rui7311746 2012-11-29 12:08:52
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代理比较熟悉的高手能些答复,急急急急急!!!!!
...全文
156 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
chenyg2000 2012-11-30
  • 打赏
  • 举报
回复
连接的是什么数据库?

535

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 Exchange Server
社区管理员
  • 消息协作社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧