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

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

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

    談笑有鴻儒,往來無白丁

    在恰當(dāng)?shù)臅r(shí)間、地點(diǎn)以恰當(dāng)?shù)姆绞奖磉_(dá)給恰當(dāng)?shù)娜?..  閱讀的時(shí)候請(qǐng)注意分類,佛曰我日里面是談笑文章,其他是各個(gè)分類的文章,積極的熱情投入到寫博的隊(duì)伍中來,支持blogjava做大做強(qiáng)!向dudu站長(zhǎng)致敬>> > 我的微博敬請(qǐng)收聽

    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 壞男孩 閱讀(1046) 評(píng)論(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.
      回復(fù)  更多評(píng)論
      
    主站蜘蛛池模板: 亚洲高清有码中文字| 亚洲天堂电影在线观看| 国产亚洲综合色就色| 亚洲第一精品福利| 亚洲精品美女网站| 人成电影网在线观看免费| 日本视频免费高清一本18| 黄页网站在线看免费| 免费人成在线观看网站视频| 亚洲精品成人片在线观看精品字幕| 亚洲男人第一av网站| 亚洲综合欧美色五月俺也去| 一级看片免费视频| 91久久青青草原线免费| 日韩在线天堂免费观看| 亚洲精品国产精品乱码在线观看| 亚洲噜噜噜噜噜影院在线播放| 精品一区二区三区免费毛片| 免费国产99久久久香蕉| 天天天欲色欲色WWW免费| 亚洲熟妇av一区二区三区| 亚洲一区中文字幕在线电影网| 日韩毛片免费一二三| 亚洲网站在线免费观看| 一级毛片直播亚洲| 亚洲自偷自拍另类图片二区 | 国产亚洲自拍一区| 亚洲人6666成人观看| www成人免费视频| 国产又黄又爽又猛免费app| 亚洲综合激情另类专区| 亚洲av无码一区二区三区观看| 一级毛片免费播放试看60分钟| 国产福利在线免费| 国产自偷亚洲精品页65页| 国产成人精品日本亚洲11| 免费91最新地址永久入口 | 国产大片91精品免费看3| 亚洲一区免费观看| 一级做a爱过程免费视频高清| 免费中文熟妇在线影片 |