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

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

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

    談笑有鴻儒,往來無白丁

    在恰當的時間、地點以恰當的方式表達給恰當的人...  閱讀的時候請注意分類,佛曰我日里面是談笑文章,其他是各個分類的文章,積極的熱情投入到寫博的隊伍中來,支持blogjava做大做強!向dudu站長致敬>> > 我的微博敬請收聽

    CAUSE

    The Oracle oracle.sql.BLOB OutputStream writes the data in chunks. Since autocommit defaults to true, the first chunk is committed. This results in the write operation for the next chunk of the Blob to fail since it appears to be in the next transaction.
    In those conditions, the ORA-22990 exception will occur with any version of Oracle JDBC driver.

    SOLUTION


    Issue the setAutoCommit(false) command. Then, explicitly commit the transaction after all of the Blob chunks have been written to the row and the stream.close() method has been executed.

    If using the Oracle 10g JDBC driver (or greater version), a second solution consists of using the standard JDBC api (setBinaryStream method of java.sql.PreparedStatement interface). And in this case, AutoCommit can be set to true.

    Here is an example:

    PreparedStatement stmt = conn.prepareStatement("INSERT INTO blobTest VALUES (?,?)"); 
    File fd = new File(testFile); 
    fis = new FileInputStream(fd); 
    stmt.setInt(1,1); 
    stmt.setBinaryStream(2,fis,(int)fd.length());



    where blobTest is a table defined as the following:

    SQL> create table blobTest (id number (4), data blob);
    posted on 2015-08-25 13:56 壞男孩 閱讀(1044) 評論(1)  編輯  收藏 所屬分類: ORACLE篇章

    FeedBack:
    # re: While inserting a large BLOB using JDBC, the application fails with:ORA-22990
    2015-08-25 14:03 | 壞男孩
    The following error occurs while inserting empty blob to return blob locators.

    ORA-22990: lob locator cannot span transaction

    DML statements were executed within a for loop to insert an empty BLOB and an attempt to fetch is made followed by commit within the loop.
    SOLUTION

    It is not advisable to use a COMMIT inside a loop. Use commit after the loop ends.
      回復  更多評論
      
    主站蜘蛛池模板: 亚洲精品永久www忘忧草| 一级特级女人18毛片免费视频| 免费的一级黄色片| 五级黄18以上免费看| 亚洲天堂男人天堂| 四虎成人免费大片在线| 国产免费福利体检区久久| 亚洲女人影院想要爱| 亚洲Av无码乱码在线播放| 99蜜桃在线观看免费视频网站| 亚洲精品第一综合99久久| 国产综合亚洲专区在线| 免费国产作爱视频网站| 国产精品午夜免费观看网站 | 中文字幕亚洲码在线| 国产午夜亚洲精品理论片不卡 | 在线免费观看韩国a视频| 免费在线观影网站| 久久亚洲精品国产精品婷婷| 亚洲自偷自偷在线制服 | 57pao一国产成视频永久免费| 色婷婷亚洲一区二区三区| 久久久久久亚洲精品| 四只虎免费永久观看| 曰批全过程免费视频播放网站| 野花视频在线官网免费1| 精品国产污污免费网站| 亚洲AV无码一区二区大桥未久 | 亚洲AV综合色区无码一二三区| 亚洲处破女AV日韩精品| 免费a在线观看播放| 91免费国产在线观看| a级毛片视频免费观看| 亚洲国产成人久久一区二区三区| 久久亚洲私人国产精品| 亚洲一区日韩高清中文字幕亚洲 | 国产亚洲精品影视在线产品 | 国产精品国产免费无码专区不卡| 在线观看永久免费| 嫩草影院在线播放www免费观看| 全部一级一级毛片免费看|