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

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

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

    探索與發(fā)現(xiàn)

    研究java技術(shù)

      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      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:
    主要針對自動增長類型的數(shù)據(jù)取值的問題:
    比如我們插入一條數(shù)據(jù):
    像原來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時我們可以在插入一條記錄時同時得到行數(shù),
    還可以訪問到自動增長的數(shù)據(jù)如:
    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
    而有些數(shù)據(jù)庫不支持自動增長類型的數(shù)據(jù),jdbc3.0也給出相應(yīng)的支持:
    // 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可以參考下面的網(wǎng)站:
    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參考網(wǎng)站
    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規(guī)范
    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 蜘蛛 閱讀(1545) 評論(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 可以這樣  回復(fù)  更多評論
      


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


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 最近免费中文字幕大全免费版视频 | 中文字幕免费在线播放| 亚色九九九全国免费视频| 91麻豆国产自产在线观看亚洲| 亚洲成a人片在线观看久| 亚洲av综合av一区二区三区| 女人18毛片免费观看| 亚洲视频无码高清在线| 卡1卡2卡3卡4卡5免费视频| youjizz亚洲| 免费无码一区二区三区蜜桃大| ZZIJZZIJ亚洲日本少妇JIZJIZ| 亚洲国产精品免费视频| 久久免费公开视频| 亚洲精品91在线| 免费看国产成年无码AV片| 亚洲欧美国产国产综合一区| 免费无遮挡无码永久在线观看视频| 亚洲国产精品特色大片观看完整版| 亚洲人成影院77777| 人禽杂交18禁网站免费| 亚洲综合av一区二区三区不卡| 不卡视频免费在线观看| 亚洲国产综合专区在线电影| 精品国产sm捆绑最大网免费站| 免费国产怡红院在线观看| 国产亚洲情侣久久精品| 亚洲色偷拍另类无码专区| 67194国产精品免费观看| 亚洲欧好州第一的日产suv| 亚洲免费日韩无码系列| 9420免费高清在线视频| 亚洲精品无码aⅴ中文字幕蜜桃| 成人午夜免费福利视频| 白白色免费在线视频| 亚洲AV日韩AV高潮无码专区| 四虎www免费人成| a色毛片免费视频| 亚洲一本一道一区二区三区| 成人午夜亚洲精品无码网站| 日本免费xxxx|