ORA-22835: buffer too small when trying to save pdf file in LONG RAW column

Hi,
I get "ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (real : 125695, maximum : 2000)" when i trying to save a 120k pdf file in an Oracle Long Raw column using dotnet 4.0 and Entity FrameWork.
Dim db As New OracleEntities
Try
Dim myEntity = (From e In db.TEXTE _
Where e.TEXT_ID = txtTextId.Text _
Select e).Single
With myEntity
If txtTextypeId.Text <> "" Then
.TEXTYPE_ID = txtTextypeId.Text
Else
.TEXTYPE_ID = Nothing
End If
.TEXT_NUM = txtTextNum.Text
.TEXT_NAME = txtTextName.Text
.TEXT_DATE = dtTextDate.SelectedDate
If DocAdded Then
.TEXT_DOC = Document
ElseIf DocDeleted Then
.TEXT_DOC = Nothing
End If
End With
db.SaveChanges()
Document is an array of Byte and TEXT_DOC also (mapped to a long row column).
is it possible to increase the size of the buffer ? how may i do it ?
Thx in advance.
Regards.

Using a custom UPDATE or INSERT stored procedure for LONG RAW column with
exceed-limit data may still get the following error.
"ORA-01460: unimplemented or unreasonable conversion requested".
One option is to use BLOB instead of LONG RAW in your table and regenerate your
data model from the table. Then using the default UPDATE or INSERT statement
(created by EF) should work.
The following will modify your LONG RAW column to BLOB column.
Disclaimers:
1. It's irreversible--you cannot modify BLOB back to LONG RAW.
2. I have not tried that when there are huge data in LONG RAW column.
So be careful.
alter table <your_table_name> modify <your_long_raw_type_column> blob;

Similar Messages

  • ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion

    Hi all,
    the following query select to_char(nvl(round(pc.target_cost*xx_primavera.geteurtolvrate,2),amount),'FM999G999G999G999G990D00') detail_amount,
    nvl(ct.cost_type, description) detail_description,
    tm_desc.memo_id,
    primavera_prj_name detail_prj_name,
    hp.party_number detail_party_number,
    xpid.interface_line_attribute1,
    utl_i18n.unescape_reference(replace(regexp_replace(utl_raw.cast_to_varchar2(tm_desc.task_memo), '<[^>]*>'), chr(13)||chr(10))) document_description,
    REPLACE(regexp_replace(utl_raw.cast_to_varchar2(tm_id.task_memo), '<[^>]*>'), chr(13)||chr(10)) prim_memo_client_id
    from XX_PRIMAVERA_INVOICES_DETAIL xpid
    join admuser.xx_ar_hz_parties xahp on xahp.orig_system_bill_customer_id = xpid.orig_system_bill_customer_id
    join hz_parties hp on hp.party_id = xahp.party_id
    left join admuser.projcost pc on pc.proj_id = xpid.primavera_prj_id and pc.cost_type_id != 29 and xpid.service_code = 8 and pc.task_id = xx_primavera.getTaskId(xpid.primavera_prj_id,'A1020', 'Изготвяне на оферта') and delete_session_id is null
    left join admuser.costtype ct on ct.cost_type_id = pc.cost_type_id
    left join admuser.taskmemo tm_id on tm_id.proj_id = xpid.primavera_prj_id and tm_id.memo_type_id = 53 and tm_id.task_id = xx_primavera.getTaskId(xpid.primavera_prj_id,'A1020', 'Изготвяне на оферта')
    left join admuser.taskmemo tm_desc on tm_desc.proj_id = xpid.primavera_prj_id and tm_desc.memo_type_id = 55 and tm_desc.task_id = xx_primavera.getTaskId(xpid.primavera_prj_id,'A1020', 'Изготвяне на оферта')
    where amount != 0
      and xpid.interface_line_attribute1 = :ra_ctp_attribute1
    ORDER BY xpid.primavera_prj_name, xpid.description;returns error:
    ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 2371, maximum: 2000) I found that the error occurs in the row : utl_i18n.unescape_reference(replace(regexp_replace(utl_raw.cast_to_varchar2(tm_desc.task_memo), '<[^>]*>'), chr(13)||chr(10))) document_description,and tried to change it to: utl_i18n.unescape_reference(replace(regexp_replace(utl_raw.cast_to_varchar2(dbms_lob.substr(tm_desc.task_memo,1,2000)), '<[^>]*>'), chr(13)||chr(10))) document_description,....but it returns not value for that field... am i using dbms_lob.substr at the wrong place? The column 'tm_desc.task_memo' is BLOB type.
    Any ideas how to cheat it ?
    Version: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    PL/SQL Release 11.1.0.7.0 - Production
    "CORE     11.1.0.7.0     Production"
    TNS for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - ProductionThanks in advance,
    Bahchevanov.

    Your second example has the parameters reversed. The amount (length) comes first and then the offset:
    DBMS_LOB.SUBSTR (
       lob_loc     IN    BLOB,
       amount      IN    INTEGER := 32767,
       offset      IN    INTEGER := 1)
      RETURN RAW;
    DBMS_LOB.SUBSTR (
       lob_loc     IN    CLOB   CHARACTER SET ANY_CS,
       amount      IN    INTEGER := 32767,
       offset      IN    INTEGER := 1)
      RETURN VARCHAR2 CHARACTER SET lob_loc%CHARSET;
    DBMS_LOB.SUBSTR (
       file_loc     IN    BFILE,
       amount      IN    INTEGER := 32767,
       offset      IN    INTEGER := 1)
      RETURN RAW;Also, remember that # of bytes is not necessarily the same as the # of characters depending on your character set. So 2000 bytes might become 4000 characters. And you have to make sure the BLOB is actually character data and not arbitrary binary data.
    Post the results of reversing the parameters and using a smaller chunk size.

  • ORA-22835: Buffer too small for CLOB to CHAR  on Solaris but not Windows

    Hi,
    I get the following error on Solaris but not Windows equivalent 10.2 installations
    ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 4575, maximum: 4000)
    ORA-06512: at line 65
    the code causing the problem is:
    SELECT A.TABLE_NAME, A.DEFAULT_DIRECTORY_NAME, B.LOCATION,
    CASE
    WHEN INSTR(A.ACCESS_PARAMETERS,'RECORDS FIXED')<>0 THEN
    SUBSTR(A.ACCESS_PARAMETERS,INSTR(A.ACCESS_PARAMETERS,'RECORDS FIXED')+14,3)
    ELSE NULL
    END RSZ FROM USER_EXTERNAL_TABLES A, USER_EXTERNAL_LOCATIONS B
    WHERE A.TABLE_NAME = B.TABLE_NAME(+);
    the entire code being executed is:
    DECLARE
    EX BOOLEAN;
    CNT NUMBER;
    SQL1 VARCHAR2(4000);
    FLEN NUMBER;
    BSIZE NUMBER;
    TABNAME VARCHAR2(4000);
    DEFDIR VARCHAR2(4000);
    RSZ VARCHAR2(4000);
    ECODE NUMBER(38);
    ERRMSG VARCHAR2(4000);
    CURSOR C1 IS
    SELECT A.TABLE_NAME, A.DEFAULT_DIRECTORY_NAME, B.LOCATION,
    CASE
    WHEN INSTR(A.ACCESS_PARAMETERS,'RECORDS FIXED')<>0 THEN
    SUBSTR(A.ACCESS_PARAMETERS,INSTR(A.ACCESS_PARAMETERS,'RECORDS FIXED')+14,3)
    ELSE NULL
    END RSZ FROM USER_EXTERNAL_TABLES A, USER_EXTERNAL_LOCATIONS B
    WHERE A.TABLE_NAME = B.TABLE_NAME(+);
    TYPE C1_TYPE IS TABLE OF C1%ROWTYPE;
    REC1 C1_TYPE;
    BEGIN
    OPEN C1;
    FETCH C1 BULK COLLECT INTO REC1;
    FOR I IN REC1.FIRST .. REC1.LAST
    LOOP
    UTL_FILE.FGETATTR(NVL(REC1(I).DEFAULT_DIRECTORY_NAME,'CARDSLOAD'),
    REC1(I).LOCATION, EX, FLEN, BSIZE);
    IF EX THEN
    IF INSTR(TO_CHAR(REC1(I).RSZ),'\.')<>0 THEN
         DBMS_OUTPUT.PUT_LINE('INVALID RECORDSIZE OR CORRUPTED FILE');
         END IF;
         DBMS_OUTPUT.PUT_LINE('Table Name: ' || TO_CHAR(REC1(I).TABLE_NAME));     
    DBMS_OUTPUT.PUT_LINE('File Exists '||REC1(I).LOCATION);
         DBMS_OUTPUT.PUT_LINE('File Length: ' || TO_CHAR(FLEN));
         DBMS_OUTPUT.PUT_LINE('Record Size: ' || TO_CHAR(REC1(I).RSZ));
    DBMS_OUTPUT.PUT_LINE('Block Size: ' || TO_CHAR(BSIZE));
         DBMS_OUTPUT.PUT_LINE('# RECORDS: ' || FLEN/TO_NUMBER(REC1(I).RSZ));
         BEGIN
         CNT:='';
         SQL1:='SELECT COUNT(*) FROM '|| REC1(I).TABLE_NAME;
         EXECUTE IMMEDIATE SQL1 INTO CNT;
    DBMS_OUTPUT.PUT_LINE('SELECT COUNT FOR: ' || REC1(I).TABLE_NAME||' = '||CNT);
         EXCEPTION
         WHEN OTHERS THEN
         DBMS_OUTPUT.PUT_LINE('SELECT COUNT FAILED FOR: ' || REC1(I).TABLE_NAME);
         ECODE := SQLCODE;
    ERRMSG := SQLERRM;
    DBMS_OUTPUT.PUT_LINE(ECODE||' '||ERRMSG);
         END;
    ELSE
    DBMS_OUTPUT.PUT_LINE(REC1(I).TABLE_NAME||' '||REC1(I).LOCATION||' File Does Not Exist');
    END IF;
         DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------');
    END LOOP;
    CLOSE C1;
    EXCEPTION
    WHEN OTHERS THEN RAISE;
    END;
    Any ideas why Solaris but not Windows would have this problem?
    Thanks,
    Victor

    Check out Bug 4715104 - ORA-22835 / truncated data from USER/ALL/DBA_EXTERNAL_TABLES

  • Report error: ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW c

    report error:
    ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 7106, maximum: 4000)
    Has anyone come across this error?
    We're inputing text using the HTML Editor Minimal. The text is saving fine, but large text inputs, when combined with the html tags, cannot be retrieved from the database, i just get the above error. I believe there is an associated DB bug for this, but i'm curious if anyone has come across this before, and if they found a work-around?

    Did you solve this?
    I have a similar problem, as posted in CLOBs Quit Working Due to > 4000 chars - ORA-22835
    Thanks,
    --BobC                                                                                                                                                                                                                                                                                           

  • Acrobat X Pro v 10.1.10 (Mac OS 10.9.3) hangs when trying to save PDF files

    Acrobat X Pro v 10.1.10 (Mac OS 10.9.3) hangs when trying to save some PDF files, after opening or after commenting.  Applies for any of the Save options.  "Watch" then "spinning beach ball" appear and application is indicated as "not responding."  Mac OS Preview has no problem with the same files.  Files can be displayed with Acrobat, just not saved.  I would prefer to use Acrobat's commenting tools to mark up the document.

    "Mac Office 2008"? You must mean Microsoft Office 2008. Try posting in the Microsoft forums here:
    http://www.officeformac.com/productforums/

  • FF hangs when trying to save pdf files

    Adobe pdf documents open fine but when I try to save a copy, FF hangs (hourglass, stops responding). Right-click and "Save link as" also hangs.
    Under Tools->Options, if I select either "General" or "Applications", it hangs. All add-ons (there are only a few) are disabled, safe mode makes no difference.
    Sometimes, I can right-click on FF on the taskbar and close it, but usually I have to use the task list to kill it.
    IE (ugh) handles pdfs fine. I've changed the download directory, cleared the download history, cleared browsing history/private data, no change.
    == This happened ==
    Every time Firefox opened
    == Can't correlate to a particular update, since I don't always open pdfs

    I tried uninstalling and re-installing FF 3.6.6 and then uninstalling and replacing it with 4.0beta. The program hangs under the following conditions (that I've found so far):
    Load pdf (I can no longer even view them)
    Click on "Tools>Options"
    Import bookmarks from an HTML file
    This happens with a clean install of FF, no changes whatsoever to the default configuration.
    On my home computers, FF works great, it's just here on my work machine. No coworkers have reported similar troubles with the same software. Is there a way I can figure out if another program is causing weird things to happen? Some diagnostic I can run that will indicate where FF is having trouble? Any assistance would be really appreciated.
    Thanks in advance.

  • Error when trying to save a file

    I get this error when trying to save any file (newly created or not) word document in MS word 2010:"You are attempting to save a file type (plain text files) that has been blocked by your File Block settings in the Trust Center".
    I followed the directions given by the Microsoft Knowledge Base article 922850, but I am still having this issue. I can still save files as PDF but not in any kind of word format. 
    I also tried opening another file copy and pasting under a different name and it doesn't help.
    Please Help.
    Bruce

    Hi,
    Please try the following methods:
    Using Administrative Template files and the Office Customization Tool to disable the restriction
    Use a trusted location, or create an exempt location
    Quote from:
    http://support.microsoft.com/kb/922849/en-us
    Regards,
    George Zhao
    TechNet Community Support

  • Firefox hangs when trying to save a file, even after removing firefox and reinstalilng afresh

    I recently experienced firefox hanging/freezing indefinitely when trying to save files, such as pdf files. The same pdf files open fine within the browser if I do not select "save link as...", but the problem occurs when I try to save such a file. The problem is similar regardless of the file type (e.g., .mp3, .txt). Not only did I go through the recommended solutions that mozilla suggests when file downloads hang, but I uninstalled firefox completely (removing all files with user settings), and then reinstalled firefox afresh without any plugins or add-ons, and I still have the same file save problem. It may also be worth mentioning that this problem does not occur in internet explorer or chrome. Maybe a system file that firefox uses got corrupted (?), but I don't know which one or how to repair it if that indeed is the problem.
    My system is running XP, and I have McAfee AV installed (which has not been a problem in the past).

    Early on I tried starting firefox in safe mode as one possible fix, and that didn't solve the problem. I just tried again right now with the fresh installation, and still no luck.
    Any other ideas?

  • I/O Error when trying to open pdf file

    I keep getting an error when I am trying to open pdf files from the internet or emails that are sent with pdf files. I am not able to view any of these pdf's - just the i/o error I receive. Anyone have anything to help me on that?? Thank you!

    Please post in the forum for the software you are using to read PDFs -
    the Adobe Reader forum for example. Good luck,
    Aandi Inston

  • Flashing screen when trying to save a file

    When i tried to save a file from Microsoft, when the screen popped up to show the possible folders to save, it started to flash at the folder preview (not the whole preview but half from mid point to bottom of the display). It was very lagging when scrolling down even though I still have almost 1GB of free memories. Most of the time I can't scroll anymore so I have to save the file somewhere without a folder and then drag to the desired folder in Finder. What should I do here?

    Save the file as a new name. Close and Open the new file.
    Most likely when a file transfer happens, Office makes the file 'Read Only'.
    If you have two opened files with the same name, the last opened file will be 'Read Only'.

  • Why do I get a program error when trying to save a file

    I've loaded and reinstalled photoshop elements 3 times. I can not save any files. all i get is cannot save file do to  program error message'
    this is a brand new product with a program error and they want me to pay them to fix there problem. it ain't right.

    which version of Photoshop Elements are you using? Also, do tell us about the flavour of Operating System you are using and the format in which  you are trying to save your file.
    You can also try saving your file to a different location( e.g. desktop) to check if your computer has any permission issues

  • Error message when trying to view PDF files online

    When attempting to view pdf files I get the following error message:
    There is a problem with adobe acrobat/reader. If it is running, please exit and try again. (507:507) Per instructions found in the forum, I have reinstalled and made sure that the box for viewing pdfs online is checked. I am still getting the error message.

    Please let me know the following:
    1. The version of Adobe Reader on your system. You can get the same by clicking on Help > About Adobe Reader.
    2. The OS you are working on.
    3. The browser being used to render the PDF.
    Thanks
    Ankit

  • When trying to generate pdf file from firefox 7.0.1 , getting corrupt content error, used to work with previous versions of firefox

    We have done toleration testing on firefox version 5 thru 6 and haven't got an issue with our website generating pdf files for our users. One of our users upgraded to firefox version 7.0.1 and they tried to generate a pdf report, now a screen pops up with Corrupted Content Error The page you are trying to view cannot be shown because an error in the data transmission was detected. I recreated this issue on my pc yesterday by installing firefox 7.0.1. Any hints as to what I need to look at would help. Cannot provide the url because it is a secure website for law enforcement. Thanks.

    You can turn off compatibility checking, but more and more of the Google Toolbar will not work. Google is no longer supporting the Google Toolbar so you should use the alternatives.
    Hi Mark,
    See http://kb.mozillazine.org/Using_Google_Toolbar_features_without_toolbars
    If you have an aspect that is not covered, indicate what that is; otherwise, expect you to be fully functional within 1-2 weeks.
    <br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small>

  • Reader 9.2 shuts down when trying to print PDF files

    When trying to print  (MS XP) PDF file" Data Execution" error message shuts down Reader. I have tried selecting/deselecting  DEP from MS "performance" options and still get the same error message.
    Any fixes for this problem?

    Hi Masroor ,
    Thank you very much for getting back to me with the "fix".
    I removed 9.2 and installed 8.3 and can now print PDF files from Reader 8.3 with no problems.
    Please let me know when the issues with 9.2/ MS are resolved. (I have checked and printer drivers are updated).
    Thanks for your help.

  • Error when trying to save .ai file

    Hi,
    I created a business card in Adobe Illustrator CS2 and now I want to change my email address on the card. I did that and tried to save it but when I did this error message came up:
    "The path does not exist".
    I don't know why it's doing that. I want to be able to edit and save it later on if need be so how can I fix this? Any ideas or help would be greatly appreciated. Thank you!
    ashmic19

    Thanks SkaldiArts I appreciate the help. I did what you said and created a new type layer and then input the text. I deleted the old type layer and everything saved. So thank you! I would have not known I needed to do that. That's kind of tricky.
    -ashmic19

Maybe you are looking for

  • CHARSET for Korean language to open Korean .wft files in workflow.

    Hi, I want to open Korean .wft files in oracle workflow builder. For that, I had given 'KOREAN_KOREA.KO16KSC5601' (and also 'KO16KSCCS' as charset) as the NLS_LANG value in the window registry but I am getting following error once I logged in to data

  • Access, fixing cursor while zooming, coloring scroll bar

    While designing a pdf page for visually impaired 1) How do you make the magnifier to stay on a fixed point of the text? As  is when you magnify a page the cursor position changes with respect to the text. But for a visually imapired person it would b

  • Location picture files in finder

    Learned how to see these files in finder.  Can't recall the trick the genius did to show these files.  A senior moment I guess.  Thanks in advance for the help.

  • Forte ADE

    A long, long time ago In a galaxy far away.... I saw a demonstration of Forte's new Application Development Environment, which was more userfriendly than the current one. It also looked more similar to the interface of the other development tools out

  • ColdFusion Event Gateway - Data Processing Delay

    Hi, We are running ColdFusion 9 inside JBOSS. We have event gateways that communicate with JMS Queue from JBOSS to acquire the vehicle related data for further processing (about 2 millions data per day in real time). However, we facing performance de