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 康文 閱讀(213) 評(píng)論(0)  編輯  收藏 所屬分類: java

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

          導(dǎo)航

          統(tǒng)計(jì)

          常用鏈接

          留言簿(1)

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 大埔县| 资兴市| 邻水| 夏河县| 扶绥县| 福建省| 会理县| 建平县| 光山县| 宣化县| 铜鼓县| 三门县| 三江| 那曲县| 长子县| 太仆寺旗| 民和| 佛坪县| 南部县| 周宁县| 木兰县| 刚察县| 余干县| 登封市| 嵊州市| 汽车| 东平县| 文水县| 湄潭县| 新昌县| 习水县| 河北区| 德化县| 勐海县| 二连浩特市| 宜君县| 江城| 保亭| 教育| 读书| 二手房|