隨筆-295  評論-26  文章-1  trackbacks-0
          jt.execute("update owners set address = 'GuangZhou' where telephone = ?",
          ????new PreparedStatementCallback(){
          ?????public Object doInPreparedStatement(PreparedStatement ps) throws SQLException, DataAccessException {
          ??????ps.setString(1, "16068008");
          ??????ps.addBatch();
          ??????ps.setString(1, "6085555487");
          ??????ps.addBatch();
          ??????return ps.executeBatch();
          ?????}
          ??});
          1. /**


          2. * Copyright: Copyright (c) 2005-2005
          3. * Company: JavaResearch(http://www.javaresearch.org)
          4. */
          5. package org.javaresearch.jerch;

          6. import java.sql.PreparedStatement;
          7. import java.sql.SQLException;

          8. /**
          9. * PreparedStatement回調(diào)接口定義。
          10. * 最后更新日期:2005年3月28日
          11. * @author cherami
          12. */
          13. publicinterfacePreparedStatementCallback {
          14. ? /**
          15. ?? * 定義PreparedStatement中的執(zhí)行內(nèi)容。
          16. ?? * 執(zhí)行前PreparedStatement的參數(shù)等內(nèi)容都已經(jīng)設(shè)置好了。
          17. ?? * @param stmt PreparedStatement
          18. ?? * @return 執(zhí)行的結(jié)果
          19. ?? * @throws SQLException
          20. ?? */
          21. ? publicObject doInPreparedStatement(PreparedStatement stmt) throwsSQLException;
          22. }


          大盤預(yù)測 國富論
          posted on 2007-09-10 11:10 華夢行 閱讀(4322) 評論(0)  編輯  收藏 所屬分類: Spring
          主站蜘蛛池模板: 巴南区| 深水埗区| 竹溪县| 明水县| 新余市| 凌海市| 芒康县| 江油市| 扎鲁特旗| 孝昌县| 贵德县| 太仓市| 攀枝花市| 阜南县| 进贤县| 岗巴县| 沙田区| 台湾省| 肃宁县| 盐城市| 临安市| 阿拉善右旗| 黔西县| 武山县| 雅江县| 南充市| 宁津县| 鸡西市| 灵台县| 吉安市| 平顺县| 潍坊市| 临漳县| 铜鼓县| 务川| 阳信县| 金堂县| 吉林省| 田阳县| 民勤县| 金秀|