<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.
      回復  更多評論
      
    主站蜘蛛池模板: av无码国产在线看免费网站| 久久国产乱子伦精品免费不卡| 四虎影院免费在线播放| 亚洲人成毛片线播放| 国产v精品成人免费视频400条| 亚洲成AV人综合在线观看| 日韩欧毛片免费视频| 国产精品亚洲一区二区麻豆| 最近2019中文字幕mv免费看| 亚洲精品无码一区二区| 亚洲国产一级在线观看| h在线看免费视频网站男男| 亚洲女久久久噜噜噜熟女| 久久青青草原国产精品免费| 亚洲伦另类中文字幕| 免费99精品国产自在现线| 亚洲熟妇无码一区二区三区导航 | 免费精品国产自产拍在| 久久国产亚洲精品| 免费国产a国产片高清网站| h视频免费高清在线观看| 亚洲小视频在线观看| 中国在线观看免费高清完整版| 亚洲精品无码av片| 亚洲精品无码午夜福利中文字幕| 免费无遮挡无码永久视频| 国产精品亚洲综合久久| 国产成人亚洲综合无码| 最近2019免费中文字幕视频三| 中文字幕 亚洲 有码 在线 | 青青草国产免费国产是公开| 久久精品亚洲视频| 日韩激情无码免费毛片| 国产一级一毛免费黄片| 亚洲kkk4444在线观看| 亚洲精品无码99在线观看| 永久免费在线观看视频| 国产精品日本亚洲777| 亚洲国产精品久久久久网站| 在线a毛片免费视频观看| 日本三级在线观看免费|