<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    探索與發現

    研究java技術

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      83 隨筆 :: 0 文章 :: 109 評論 :: 0 Trackbacks
    ?MySQL Connector/J下載地址
    http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-3.1.12.zip/
    主要新增功能是:
    The driver now also supports "streaming" result sets, which allows users to retrieve large numbers of rows without using a large memory buffer. With newly added large-packet protocol support, the driver can send rows and BLOBs up to 2 gigabytes in size.

    New features from the JDBC-3.0 API in the latest production version of MySQL Connector/J include getGeneratedKeys which allows users to retrieve auto-increment fields in a non-database-specific way. Auto-increment fields now work with object-relational mapping tools, as well as Enterprise Java Beans (EJB) servers with Container Managed Persistence (CMP) that support JDBC-3.0.

    The development version is being refactored to support new features in conjunction with version 4.1 of the MySQL database server, including server-side prepared statements and improved handling of multiple simultaneous character sets, including Unicode in the UCS2 and UTF8 encodings.

    Retrieval of Auto Generated Keys:
    主要針對自動增長類型的數據取值的問題:
    比如我們插入一條數據:
    像原來jdbc2.0時我們這樣干的:
    Int rowcount = stmt.executeUpdate (
    "insert into LocalGeniusList (name) values ('Karen')"); // insert row
    
    // now get the disk address – rowid – for the newly inserted row
    ResultSet rs = stmt.executeQuery (
    
    "select rowid from LocalGeniusList where name = 'Karen'");
    jdbc3.0時我們可以在插入一條記錄時同時得到行數,
    還可以訪問到自動增長的數據如:
    Int rowcount = stmt.executeUpdate (
    
    "insert into LocalGeniusList (name) values ('Karen'),
    Statement.RETURN_GENERATED_KEYS); // insert row AND return key
    
    ResultSet rs = stmt.getGeneratedKeys (); // key is automatically available
    而有些數據庫不支持自動增長類型的數據,jdbc3.0也給出相應的支持:
    // insert the row and specify that you want the employee ID returned as the key Int rowcount = stmt.executeUpdate ( "insert into LocalGeniusList (name) values ('Karen'), "employeeID");
    ResultSet rs = stmt.getGeneratedKeys (); // Karen's employeeID value is now available
    要想了解更多的jdbc3.0可以參考下面的網站:
    http://www.datadirect.com/developer/jdbc/topics/jdbc30/index.ssp
    http://www-128.ibm.com/developerworks/java/library/j-jdbcnew/
    http://www.onjava.com/pub/a/onjava/synd/2001/08/21/jdbc.html?page=3
    jdbc4.0參考網站
    http://www.theserverside.com/news/thread.tss?thread_id=34465
    http://weblogs.java.net/blog/lancea/archive/2006/05/jdbc_40_sqlxml.html
    http://java.sys-con.com/read/111252.htm
    下載jdbc4.0規范
    http://192.18.108.135/ECom/EComTicketServlet/BEGIN747810F695946413098EEF45230B1F12/-2147483648/1488530847/1/686798/686786/1488530847/2ts+/westCoastFSEND/jdbc-4.0-pr-spec-oth-JSpec/jdbc-4.0-pr-spec-oth-JSpec:2/jdbc4.0-pd-spec.pdf
    posted on 2006-05-19 08:33 蜘蛛 閱讀(1548) 評論(1)  編輯  收藏 所屬分類: jdbc

    評論

    # re: jdbc3.0自動增長類型取值方案 2006-05-20 09:53 劍事
    ResultGather rs = new ResultGather("insert into mms.dbo.TBL_RESERVED_MMS(SEND_PHONE,RECV_PHONE,SERVICE_CODE,CONTENT_TYPE,VAS_SUBJECT) values('phone ',' fromphone',' serviceid','M','title') SELECT @@IDENTITY AS 'linkkey'");

    SQLSERVER 可以這樣  回復  更多評論
      


    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 亚洲高清视频在线| 亚洲国产成人久久综合一| 亚洲国产韩国一区二区| 日韩免费高清大片在线| 亚洲真人无码永久在线| 国产成人1024精品免费| 久久久久国产亚洲AV麻豆| 一级有奶水毛片免费看| 亚洲午夜成人精品电影在线观看| 免费人成在线观看播放a| 免费一级毛片在播放视频| 免费无遮挡无码视频在线观看| yy6080久久亚洲精品| 国产精品美女免费视频观看| 亚洲人成伊人成综合网久久久| 亚洲日韩在线观看免费视频| 国产亚洲精久久久久久无码AV| 三级毛片在线免费观看| 亚洲国产高清在线| 美女视频黄免费亚洲| 亚洲成a人无码亚洲成av无码| 四虎永久免费地址在线网站| 一进一出60分钟免费视频| 亚洲精品V欧洲精品V日韩精品| 无码少妇精品一区二区免费动态 | 成人a毛片免费视频观看| 亚洲精品无码久久久| a毛片久久免费观看| 久久亚洲AV无码精品色午夜| 免费国产黄线在线观看| 最新亚洲人成无码网站| 亚洲最大AV网站在线观看| 久久精品人成免费| 国产午夜亚洲精品不卡| 亚洲精品无码不卡在线播放HE| 亚洲成人免费网站| 黄色a级免费网站| 亚洲人成电影亚洲人成9999网| 大地资源二在线观看免费高清 | 久久最新免费视频| 91嫩草亚洲精品|