jdbc-batch processing

          the addBatch() method is basically nothing more than a tool fro assigning a bunch of sql statements to a jdbc statement object for execution together

          PreparedStatement stmt=conn.prepareStatement(
          ????? "update account set balance=? where acct_id=?");
          int[] rows;
          for(int i=0;i<accts.length;i++){
          ??? stmt.setInt(1,i);
          ??? stmt.setLong(2,i);
          ??? stmt.addBatch();
          ? }
          rows=stemt.executeBatch();

          posted on 2006-10-11 14:40 康文 閱讀(210) 評論(0)  編輯  收藏 所屬分類: java

          <2006年10月>
          24252627282930
          1234567
          891011121314
          15161718192021
          22232425262728
          2930311234

          導航

          統(tǒng)計

          常用鏈接

          留言簿(1)

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 丹凤县| 马龙县| 和硕县| 柳林县| 靖西县| 武宁县| 县级市| 崇文区| 松桃| 合江县| 南岸区| 舒兰市| 云林县| 山东省| 葵青区| 桐城市| 潮州市| 介休市| 定南县| 沿河| 濮阳市| 邻水| 潞城市| 高邮市| 菏泽市| 娄底市| 贡嘎县| 日喀则市| 西盟| 吴忠市| 荔波县| 曲松县| 龙门县| 合山市| 宁国市| 杨浦区| 镇宁| 东安县| 阿拉善盟| 屏东市| 阜南县|