Problem with printing using htp.prn CLOB

Hello

Oracel 11g R2
Apex 4.1

I got a reference from this forum on how to print the CLOB data using htp.prn.

However, when I run my procedure, I get the error
 ORA-06502: PL/SQL: numeric or value error: character string buffer too small 
The length of the clob is 195734.

The code is
 

CREATE OR REPLACE PROCEDURE nat_test_lsp_ws_3
IS

   l_amt NUMBER DEFAULT 8191;
   l_offset NUMBER DEFAULT 1;
   l_length NUMBER DEFAULT 0;
   v_clob CLOB;
   
 
BEGIN

SELECT dbms_xmlgen.getxml('select * from table(pkg_bp_eisa.lsp_exa_ws(7))') into v_clob FROM dual;
 htp.htmlopen;
  htp.bodyopen;
  l_length := dbms_lob.getlength(v_clob);
  dbms_output.put_line('Length of Clob:='||l_length);
  IF l_length > 0 THEN 
  WHILE (l_offset < l_length)
  LOOP
   htp.prn(dbms_lob.substr(v_clob, l_amt, l_offset));
   l_offset := l_offset + l_amt;
  END LOOP;
  END IF;
  htp.bodyclose;
  htp.htmlclose;
  

EXCEPTION
   WHEN OTHERS THEN
   dbms_output.put_line(dbms_utility.format_error_stack);
   dbms_output.put_line(dbms_utility.format_error_backtrace);
   RAISE;

END;
I get the error on line htp.prn...

However, if the clob size is too small, it is printing. Are there no restrictions for the clob to print size?

Thanks in advance.

Kind regards

Natarajan

Natarajan,

Your procedure works very well under the Express Application. If you run your procedure of SQL commands, no error is encountered. If you run it from SQL * more or outside of a context of APEX, then you will encounter the error you reported.

To remedy the problem, add the following line in the first executable statement in your procedure:

sys.htp.htbuf_len := 63;

Joel

Tags: Database

Similar Questions

  • Connected HP OfficeJet Pro 8600 Plus status reads "problem with printer."

    I could just ePrint on an OfficeJet Pro 8600 Plus replacement and them have not used for printing yet. I was in the devices page to manage the settings and change an address for one of my devices. The newly added column 8600 State reads 'Online', but also 'problem with printer '. Instructions I was referring to the display panel of the unit for Outlook2003 on the given problem. A check of the display surface showed no information, just a typical home screen. I checked through the display print and found no problems-all functionality is enabled and fully functioning. I checked then the functions of printer in the window 'Printers and devices' of all computers (all running Windows 7 Professional) on the office network. The 8600 are active and full functionality works correctly between the printer and all the computers.

    I then close the printer 8600, left for several minutes, and then lit it back and reconnected. The State says 'Problem with printer' remains in the device window HP.

    I am at a loss as to what this supposed problem can be and don't know what should be a next step. Does anyone have any advice or information that could help in this situation? It would be appreciated. Thanks in advance to those who could help

    HP support responded to my question by e-mail. I was told that the message 'Problem with the printer' is due to a bug in their system. Also said that as long as the status column indicates the printer is "Online" and everything else is fnctioning correctly, don't worry about this.

    I consider that a resolution of the post!

  • I have a problem with printing on Windows Vista.

    I have HP desktop with Microsoft Vista operating system.  The printer I have is HP Laser Jet P1006.  1 months ago about the computer wouldn't print or download an attachment to an email.  I uninstalled the printer and re-installed, but the problem persists.

    What happened, it was this.  With an email (from gmail.com or hotmail.com) once I clicked 'print', the normal menu for printing that should go up.  Then I clicked 'print', the monitor would show a display of the menu "save under" and showed the formulations of XPS as 1 line and XPS Documents like the following line.  When I chose the option search for a printer and typed in the name of the HP Laser Jet P1006 printer and click "select", the system responded to that file name is not valid.

    Please explain what was wrong and how to fix these problems with printing and download of attached file.

    Hello

    Please contact the Microsoft Community.

    Have you tried to print using a different printer?

    I would have you try the steps of troubleshooting in these articles.

    http://h20565.www2.hp.com/portal/site/hpsc/template.PAGE/public/psi/troubleshootResults/?javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken&javax.portlet.prp_e97ce00a6f76436cc859bfdeb053ce01=wsrp-navigationalState%3Daction%253Ddoclist%257Ccontentid%253DK.01.05.02&javax.portlet.tpst=e97ce00a6f76436cc859bfdeb053ce01&sp4ts.oid=3435682&ac.admitted=1402468218790.876444892.492883150

    http://h10025.www1.HP.com/ewfrf/wc/documentSubCategory?tmp_task=solveCategory&CC=UK&DLC=en&LC=en&product=3435684

    Note: I would first try to 'doctor HP Print '.

    If this problem is limited to the HP printer, so I'd like you to contact the respective support]-

    http://h10025.www1.HP.com/ewfrf/wc/product?cc=us&LC=en&DLC=en&product=3435684

    We know if you need help.

  • Problem with printing in format Adobe acrobat, DC

    Help

    I have can´t open the Printmenu and print my documents in format Adobe Acrobat, DC

    Since some day´s a can´t print my documents in Adobe DC.

    What I did:

    0 reinstall new driver for my printer

    1. New Installation of Adobe Acrobat DC

    2. Installation of the New Apple OS X el Capitan software.

    3. what once again deleting the installation of Acrobat and the installation of new Adobe acrobat DC.

    4. all other software can use the printer on my system.

    Important: before that I had problems with printing works I didn t have had problems.

    What can I do?

    Thank you

    Neugebauer, Germany

    Hi frankn30090339 ,

    Sorry for the inconvenience.

    You can download the latest patch that contains the resolution of this problem.

    Please see this link: failed to print in Adobe Acrobat format

    Let us know if you need additional assistance.

    Concerning

    Sarojini

  • Problem with printing pdf from Adobe Acrobat Pro

    Hello

    I have Adobe Acrobat Pro 9.4.3.

    PDF-print has always worked a lot, but all of a sudden, there is some kind of problem.

    After you print a "Print to PDF" built-in excel document in MacOS or Adobes printer I have PDFs corruptet when showing them in Adobe Reader/Acrobat, but MacOS software preview shows them correct.

    So there can't be any problem with printing, but the local preview on my computer using Acrobat or Reader. I don't even use the Myriad in document police, I use Verdana.

    screen.jpg

    You say you use Verdana, but you're not. The error message clearly indicates that you use MyriadPro "BOLD".

    You probably recently installed Mac OS X 10.6.7 update that has a bug with OpenType PostScript as "BOLD" MyriadPro fonts. Use the Verdana or another font TrueType or PostScript, or come back to Mac OS X 10.6.6.

    Discover the problem here: http://www.tidbits.com/article/12078

  • HP AIO 1515: problem with printing photo 13 x 18

    Hi I have a problem with the print photo (13 x 18) size she cut in the end of photo I use hp photo creations but if choose 100% size or fullscreen, same result please what can I do;  I am disappoint bought this printer if photo print well

    Please help me

    Hi @nik1,

    I see by your post that the printer cuts off the image when printing on paper 13 x 18. I want to help you.

    According to the specifications of the printer, it does not support this paper size. You will need to use a supported paper size. The largest size is US legal 8.5 x 14 inches.

    Specifications of printer for printer HP Deskjet 1510 and Deskjet Ink Advantage 1510 All - in - One Printer Series.

    If you appreciate my efforts, please click on the "Thumbs up" button below. Thank you.

  • HP 6600 printer: I have a problem with printer Hp 6600

    Even if I do not print colors, my motto keep depleting the color cartridges and will not work until all color cartridges are installed. What can I do if I want to use only the black cartridge?, it was so boring.

    Hi @Stork11,

    Welcome to the HP Forums!

    I understand your frustration. However, this printer uses same color inks when printing in black only. If run out you of color and kept black printing only, you provoquerez problems with the print head. FYI, here's the guide to your printer , see page 74. I also linked page to provide information HERE.

    Hope this information is useful and have a great day!

    "Please click the Thumbs up icon below to thank me for having responded."

  • Problems with printer D110a

    I am running Windows 7 64 bit. Never had a problem with the printer until today. I installed a new black cartridge HP 60. The alignment test failed during the sweep phase, error says I don't have a pattern of good alignment. I can print, but when I try to scan, the grip of the printer, I can't stop it by pressing the power button. Have completed the task by using the Task Manager. I tried to restart and unplug the printer. Should I try to reinstall the printer? I seem to remember that a new printer driver has been installed recently.

    Thank you

    Rege

    The alignment page was only a black rectangle, no other color. After the reinstallation of the black cartridge, I restarted the alignment test, and it worked OK. The new alignment page had colors next to black. Not sure what happpened, but the printer works OK now.

    Thank you

    Rege

  • Multiple annoying problems with printing!

    I'm more tired of the problems that I have all of a sudden. I just changed all the ink cartridges in my machine, but for some reason is not printing black. In addition to this I had problems with paper jams! I've never had a problem before, but now all of a sudden I'm getting jams left and right? If the above is not enough to test my patience, I now get into the tail printed after each use and removes the work so that it will pass to the next task. WTH? HP and Mac do not play well together? Of course, I went from my little one year warranty date. I tried to search the forums to see if others have the same or similar issues, but haven't found anything. Can you help me?

    Download and install this: http://support.apple.com/kb/DL907

    Restart your Mac.

    Reset the printing system:

    -Go to System Preferences > print & Scan
    -Right (or control) click in the rectangle listing your printers and select Reset Printing System.
    WARNING - This will remove ALL your printers!
    -Select the sign more to add a printer. Select the default tab on the top of the window. Search for the printer, select it, and then beside the dropdown 'Use', select the model of the printer (not AirPrint). Wait for the 'Add' button becomes available. Until it clicks.

  • HP Officejet Pro 8610: Error code problem with printer or ink system

    sent a fax Monday very well and now I'm going to use printer & fax to search for these words in the window:

    "There is a problem with the printer or ink system. Stop printer, then if the problem continues contact HP. »

    I had done this several times as well as other things that HP troubleshooting suggested.

    Hi @MrsQT,

    I see that you get an error on the printer or ink system and made the suggested troubleshooting already. I'd be happy to help and find a document for you to review to make sure that you have tried everything: HP OfficeJet Printers - resolve the error 'Problem with ink system'.

    If the problem persists, I suggest to call the hotline to see if you may be able to get a discount on a newer model, or replace your printer if it is under warranty still. HP printers usually have a warranty of 1 year from the date of purchase, you can check the warranty using the following if you wish; guarantee cheque.

    If however the recommended solutions solve the issue please click on accept as Solution on this post so that others can find what worked for you.

    What you can do, is to use the following link to create yourself a file number, then call and it can help to expedite the appeal process:

    Step 1. Open the link: www.hp.com/contacthp/
    Step 2. Enter the product number or select Auto detection
    Step 3. Scroll up to "still need help? Fill out the form to select your contact options.
    Step 4. Scroll down and click on options contact HP - click Get phone number

    File number and phone number are displayed.

    I hope this helps.

  • HP 710 C WIN 7 64 BIT - problems with printing

    Hello

    I have win7 64 bit and problems with the installation deskjest hp 710 c. I've used drivers from microsoft windows update and still my printer stay calm. Now, I have no idea what to do... ?

    For example: I open the word document - press 'Print' - but memory printer is empty

    Any ideas?

    There is a patch that solves the problem available here.

  • Problem with printer, exported to PDF

    Hello, I have a problem with my printer to work. I recently installed acrobat from adobe pro xi. And from a pc, we can use option of the printer to export PDFs, but on the other, we cannot. It reports a problem in the system. So I uninstalled the program and reinstalled after a while but the same problem bulging guard.

    It says this:

    I don't understand what is the exact problem because the installation was made in the same way to this computer than for others and that they do not appear this problem.

    What you think is the source of this problem and what can I do to fix this?

    Thank you very much for taking the time to read this also.

    Nevermind guys, I understand it. For all of you who have the same problem, the solution is:

    1 open my computer and navigate to: C:\Windows\system32\config\systemprofile (per-folder if it is easier for you) and check if there is the Desktop folder.

    2. If there is no such thing as the Desktop folder, and then create a new folder and rename it to desktop or copy it from C:\users\Default\Desktoplocation.

    Note: C:\Users\Default is hidden by default

    Hope that helped :D

  • Problem with printing Module

    A few weeks ago, I tried to print from print and module instead of a photo showing upwards, there was white space.  I uninstalled and reinstalled LR 3 times.  I need help.  Thank you

    Yes. Develop is ok.  I got no problem with any other part of the LR4.  I chose the picture I want to print, and Yes, I select a template.

    My next step, yesterday, I reinstalled 64 LR3 and it works as it should.

    I used LR for several years, I started with LR3, and after about a year and a half has decided I could use the additional functionality of the LR4.  I used 4 LR for a year or more and all

    was just what I wanted.

    I reinstalled LR4 three times.  I compleetly uninstalled every time and started with a new facility.  This brings me to a point of complete annihilation.

    I have fought this during about three weeks now.  I really need a help even if Photoshop want to weigh in on that I would appreciate it

    Thank you for your effort

    F. McLion wrote:

    Develop is OK?

    Did you select a model in the print module and one or a few images on film?

  • Problems with printing to PDF with Acrobat Pro 9 and FireFox 8

    The page that I use for my base is: http://blogs.adobe.com/digitalpublishing/2010/12/google-ebooks.html

    I have Adobe Acrobat 9 Pro and FireFox 8 is installed.

    The problem with FireFox is when I select a part of a web page and try to print the selected text, the first line gets chopped, if the text is small, the first line could even be completely missing.  It is perhaps a matter of margin but don't know how to edit it.FF.png

    I know I'm not very clear but if anyone has any ideas or would like more info please let me know.

    Thank you.

    I suspect that if you do the same process with a print on paper, you will get the same result. I got the same result with SeaMonkey, but IE8 printed the police complete in PDF format. Which suggests that it is not Acrobat, but the browser. As I said, suggests, so pay attention to your conclusions.

  • Problem with Hotmail using Firefox

    First of all, I am aware that this problem has happened to other people. They have different levels of success with different solutions. Thing is, at this moment, none of them work for me.

    I have Firefox 12.0 and starting yesterday I can access my Hotmail account, no problem, but it does not save the clicks in the e-mail domain. I can sort of browsing around, but I can't read emails; I can't send e-mail messages; and I end up having to use Internet Explorer.

    It's happened before, a couple of months. At the time, what worked was using Hotmail with an HTTPS connection. Worked like a charm.

    Now, it does not work. Neither clear cache my story or my cookies. Neither fact restart Firefox in safe mode, i.e. with all disabled add-ons. So I'm at the end of my rope, because nobody seems to have any other advice.

    The only thing I can think of who might be involved was running an MicrosoftFixIt program, which sets out what seems to be a recurring error for many users (sometimes Windows Update would list not updated). I did a couple of days, and yesterday I had this problem with Firefox. I had done once before, and well I'm not sure I * think * it is at the same time I got my first issue of Hotmail.

    Outside the info in troubleshooting information, all I have to add is that I use Windows 7 Ultimate.

    Any help would be appreciated. See you soon.

    the details of the system, you have presented that it seems you have the plugin pdf foxit reader on your system - it is known to cause problems with hotmail since firefox 12. Disable it in firefox > addons > plugins until there an update by foxit, which solves the problem

Maybe you are looking for