Htp.formFile

Hi all,
If i use htp.formFile in a dynamic page (as SQL inside oracle tags), i have a browse button, can i read the value that is displayed in the text beside the browse button.
note: i found that htp.formFile has an attribute caccept(varchar2), but i don't know if it is what i need or how to use it.
Thanks.
Rasha.

Are you trying to upload the file via a form in the browser?
This is not supported with the add_item API. You have to first
upload the file using the PL/SQL gateway (see the mod_plsql
documentation for information on how to do this), then use the
add_item_post_upload procedure. I think you need Portal 3.0.9
to do this.
Regards,
Jerry

Similar Messages

  • Problems with uploading file to database using FND_GFM

    Hi
    I'm having some problems uploading files to the database in apps 11.5.9
    As various sources/documents tell me, using the standard FND_GFM / FND_FILE_UPLOAD packages of APPS should transfer an uploaded file into the FND_LOBS table, but some reason it doesn't work. I copied and altered the FND_GFM.upload_confirm function to try and figure out why it doesn;t work and it looks like the file to be uploaded does not appear in the defined table (FND_LOBS_DOCUMENT).
    The following DAD is defined (with hidden password and servername to prevent abuse ;)):
    [DAD_oes_s]
    connect_string = oes_s
    password = ****
    username = APPS
    default_page = fnd_web.ping
    document_table = APPS.fnd_lobs_document
    document_path = docs
    document_proc =
    upload_as_long_raw =
    upload_as_blob = *
    reuse = Yes
    connmax = 10
    pathalias = fndgfm
    pathaliasproc = fnd_gfm.dispatch
    enablesso = No
    cgi_env_list=SERVER_NAME=***,REQUEST_PROTOCOL=http,SERVER_P
    ORT=***,HOST=***
    input_filtering = Yes
    stateful=STATELESS_RESET
    And I'm using the following code to generate the upload-file page
    CREATE OR REPLACE PROCEDURE XX_ITRIS_HelloWorld AS--(file IN VARCHAR2) AS
         access_id_v varchar2(1000);
         BEGIN
              htp.htmlOpen;
              htp.bodyOpen;
              htp.formOpen('http://***/pls/oes_s/fnd_file_upload.uploadcompletemessage', 'GET', null, 'multipart/form-data');
              htp.formFile('file');
              access_id_v := fnd_gfm.authorize(null);
              htp.formHidden('access_id', access_id_v);
              htp.formSubmit();
              htp.formClose;
              htp.line;
              htp.bodyClose;
              htp.htmlClose;
         END XX_ITRIS_HelloWorld;
    Can anybody point out what is going wrong?

    You said you are uploading XML file whereas in the TSQL you have assign as text file i.e @SourceFile = 'test.txt'. Are you sure that you are copying XML file ? What is the size of the source file "test.txt" ? I am sure it is 0 KB. That is what you
    have found in FTP site.
    Regards, RSingh

  • How to call a parametrized procedure from a htp.formsubmit

    Hi there, i'm trying to call a procedure with parameters from my formsubmit. i would like to call that procedure once my submit button is pressed. I did this :
    HTP.formOpen(twbkwbis.f_cgibin||'MyPackage.MyProcedure(param1, param2, param3, param4)');
    twbkfrmt.P_PrintText('<input type=submit name=ACTION  value="Soumettre">');
    HTP.formClose;
    but i had that 404 error page not found .
    i also did this :
    twbkfrmt.P_PrintText( htf.formSubmit(NULL, 'Soumettre', cattributes=>'ONCLICK= " return MyProcedure(param1, param2, param3, param4) " ') );
    and still the same error...does anyone have an idea to help me with this...thank you
    Edited by: user11146505 on 2009-07-10 06:49
    Edited by: user11146505 on 2009-07-10 06:51
    Edited by: user11146505 on 2009-07-10 06:52
    Edited by: user11146505 on 2009-07-10 06:52
    Edited by: user11146505 on 2009-07-10 06:54
    Edited by: user11146505 on 2009-07-10 06:55
    Edited by: user11146505 on 2009-07-10 06:55
    Edited by: user11146505 on 2009-07-10 06:57

    Hello and welcome to the list,
    To call your MyPackage.MyProcedure procedure as the submit action of a form use code like this:
    HTP.formopen('MyPackage.MyProcedure ','POST');
    HTP.formtext('param1');
    HTP.formtext('param2');
    HTP.formtext('param3');
    HTP.formtext('param4');
    HTP.formsubmit(cvalue=>'Soumettre');
    HTP.formclose;Note that when your code gets called it will be passed named parameters corresponding to each of the fields defined in the form, so if your procedure has 4 paramters named param1, param2, param3, param4 then you need 4 fields on your form with the same names, additionally the should each be defined with a default value such as NULL since unfilled fields on the report are not guaranteed to be passed to your procedure. If you have fields in your form with names other than the paramter names in your procedure you will get an error.
    As you can see there is no need to define the parameters in the formopen procedure, and no need to define an onclick handler on the submit button. Also you don't want to name the submit button unless you are going to pass the value of the buttons label (the cValue) to your procedure as a paramter.

  • Using htp.p for print dynamic data in apex region make my page slow?

    Hi, everyone!!! My name is Rafael, and...
    I search in the web and in this forum but i can´t find a answer for my doubt.
    Using the procedure htp.p for print dynamic data in apex region through on demand process , this will leave my webpage slow to load when the user access?
    Example:
    For build a menu in my webpage, it´s read a function in the database that returns variable string, so by a demand process this string is obtain and print in a web page using htp.p.
    I notice that this practice causes slow to load the data on the page.
    This is it...
    If someone help me, thanks...
    bye and Happy new Year!!!
    Edited by: user9518141 on 26/12/2009 17:19

    Hi,
    Try commenting out the function call and print some sample text in the htp.p like htp.p('Hello world..');
    I think the function call is probably taking a lot of time .. not htp.p.
    I have used htp.p to print out values dynamically in a lot of situations and have not ever come across any performance issues.It could be a problem with the function you are calling.
    Thanks,
    Rajesh.

  • How to avoid error "HTP 404" when working with "Google Suggest" and Apex 3?

    Hi,
    I am trying to implement the GOOGLE SUGGEST function in an APEX application (a sample of Google Suggest + APEX can be found in http://htmldb.oracle.com/pls/otn/f?p=22777:6:4312817919732414 or http://teradata.weizheng.net/2009/08/using-google-suggest-in-apex.html).
    The release of APEX is 3.2.1 and of RDBMS is 9.2.0.8 (64 bits). They are installed on a SOLARIS 9 SPARC 64-bits server, where i have an EBS 11.5.9 application. So, i´m using RDBMS and Apache of EBS 11.5.9 to work with APEX 3.2.1.
    I can see the list generated by javascript function when i type in P2_REPORT_SEARCH, but when i SELECT an item (pressing ENTER), i have got an "HTP 404 error". Looking in the logs in the apache, i have found this error:
    http://prigaudi1.sote.tasa.com.ar:8002/pls/apex/wwv_flow.accept
    [Tue Jul 26 10:12:53 2011] [error] mod_plsql: /pls/apex/wwv_flow.accept ORA-0
    wwv_flow.accept: SIGNATURE (parameter names) MISMATCH
    VARIABLES IN FORM NOT IN PROCEDURE: AQ,OQ
    NON-DEFAULT VARIABLES IN PROCEDURE NOT IN FORM:
    I think that "AQ" and "OQ" are variables of "ac.js" javascript.
    The JAVASCRIPT procedure that is situated on HTML HEADER of PAGE 2 is :
    <script src="/i/BASE_CONOCIMIENTO/ac_google/ac.js" type="text/javascript"> </script>
    <script language="Javascript" type="text/javascript">
    function iac()
    { InstallAC(document.wwv_flow,document.getElementById
    ('P2_REPORT_SEARCH'),"","ASKTOM.incsearch_articulo","en"); }
    </script>
    The JAVASCRIPT function that is situated on HTML BODY ATTRIBUTE is:
    onLoad="iac()"
    My "INCSEARCH" procedure is described below:
    CREATE OR REPLACE PROCEDURE IncSearch_ARTICULO(qu VARCHAR2, hl VARCHAR2, js VARCHAR2,
    client VARCHAR2 default null) AS
    l_List1 varchar2(10000);
    l_Query varchar2(255);
    l_separator varchar2(10) default '';
    BEGIN
    l_Query := qu || '%';
    FOR x IN (select TIT_TOPICO,NULL AS COMPLEMENTO from BAC_TOPICO where Upper(TIT_TOPICO) like Upper
    (l_Query) order by 1)
    LOOP
    l_list1 := l_List1 || l_separator || '"' || x.TIT_TOPICO || '"';
    l_separator := ',';
    END LOOP;
    owa_util.mime_header('text/html', false);
    owa_util.http_header_close;
    htp.p('sendRPCDone(frameElement, "'|| qu ||'", new Array(' || l_List1 || '), new Array(""), new Array(""));');
    END INCSEARCH_ARTICULO;
    I think this procedure is working fine on Apache Server:
    Example:
    http://prigaudi1.sote.tasa.com.ar:8002/pls/apex/asktom.incsearch_articulo?qu=A&hl=A&js=a <enter>
    sendRPCDone(frameElement, "A", new Array("Ayuda Como crear un topico en la base de conocimiento"), new Array
    (""), new Array(""));
    I would like to know how i can solve this problem of HTP 404 and "SIGNATURE (parameter names) MISMATCH"
    Best regards,
    Sergio Coutinho

    Hi,
    Maybe i provided too much information about my problem,
    Well, i tried to implement the solution "Google Suggest" in my APEX 3.2 application, but i´m having now an "HTTP 404 error" when i select an iten in the list buided by "google suggest".
    Can anybody make a suggestion of how i could analize this error and fix it?
    Best regards,
    Sergio Coutinho

  • Special character and htp.p()

    I am trying to use PL/SQL procedure to present my customized item.
    If user type in secial character, e.g. single quote ', in the attribute, I got this error on the page:
    Error 30584: DBMS_SQL has raised an unhandled exception. ORA-06550: line 1, column 327: PLS-00103: Encountered the symbol "03" when expecting one of the following: . ( ) , * @ % & = - + < / > at in is mod not rem <> or != or ~= >= <= <> and or like between ||
    Is there a procedure I can call to encode the special character?
    thanks

    Hi - thanks very much the reply. I will bear your suggestions in mind in future as they are very useful.
    I got around the problem I was having by doing the following:
    The line of JavaScript I wanted to output to the page was:
    document.write('&lt;img src=" '+ns_l+' " width="1" height="1" alt="*" /&gt;');}
    And I achieved this by using the following PL/SQL:
    htp.p('document.write('||'''&lt;img src="'''||'+ns_l+'||'''" width="1" height="1" alt="*" /&gt;'''||');}');

  • PLSQL Web Tool Kit (HTP) disabled in R12 - What are the alternitives

    We have developed a fair amount of add-on applications in our e-business suite using the plsql web toolkit (htp). This functionality has been disbaled in R12.
    My question to Oracle, "What is the work around for using applications we developed in 11i that were developed using the plsql web toolkit?
    Oracel response:
    R12 does not support WWK fucntions.
    You will need to recreate these as custom JSP pages.
    The pl/sql toolkit in the Apache Server is disabled in R12 as a security precaution.
    1. What are other people doing who have encountered this issue?
    2. Is it possible to enable the pl/sql toolkit in the apache server? If for nothing else than to buy time until these apps are re-written as jsp apps.
    3. Is anyone doing something other than jsp? i.e. SSWA Servlet Function?
    Any help or suggestions appreciated.

    Pl see your duplicate post here - R12 plsql web toolkit disabled - what are the alternatives?
    Srini

  • How to get the complete path of the file that is selected using FormFile

    i m working on struts..
    i hv used FormFile like
    <html:file property="xsdpath" value="Browse" />
    need to get the whole path that i will select using browse button
    for example d:\foldername\filename.java
    but FormFile Api has a method getFileName(); which returns the filename, for getting the absolute path wat has to be done.
    please reply bak soon
    thanks in advance

    here i use formfile <html:file> just to allow the
    user to select a xml file .
    so i need to get the whole path of the selectedfile
    to parse the xml file.No you dont.
    You would definitely benefit from further reading on
    file upload.
    <html:file> tag renders an HTML <input> element of
    type file.
    When a user uploads a file, this file is sent as a
    stream of data, which a program (jsp/servlet) on the
    server, reads and stores the data back in the form
    of a file on the server.
    Any server program that needs to parse the file,
    should do so on the file stored on the server.
    There's no point in knowing the absolute path of the
    file on the client machine. If a server program can
    parse a file on the client machine, why upload the
    file in first case ? Get the drift ?
    i also want to show my user the path he hadselected.
    If you have such a requirement, then yes.
    But it sounds weird to me. If you see my response
    above, you will realize that the server has a copy of
    the client's file uploaded and then parsed. What if
    the client has changed his file after upload ?
    cheers,
    ram.I also have a requirement to get the whole filepath of the file selected and place this information into a table. From FormFile I can only retreive the absolute filename
    Any suggestions would be helpful.
    Thanks, dam

  • Htp query in Oracle

    I have Pl/sQL procedures and packages which contain htp statements htp.htmlopen; etc to present the output of the SQL query in web based HTML format
    We use htp.tabledata to represent the data in a tabular format. I would like to decrease the font size and also to reduce the width of the tables in order to
    make it display in a single screen rather than scrolling down to view the data
    Pls can anyone suggest on this

    This helps?
    Fixed Width for htp.tableData()?
    And this?
    http://download.oracle.com/docs/cd/B14099_19/web.1012/b15896/pshtp.htm#i1006166
    Edited by: Vitor M.A. Rodrigues on 20/Jul/2011 9:52

  • Adding pagination in report build from PL/SQL dynamic content using htp.p

    Hi,
    I have a requirement for which i used PL/SQL dynamic content to build my report and i displayed my report using a cursor and loop by HTP.P function.
    Now problem is I have report with more than 500 rows and I want to add pagination concept for this report.
    How can i do that?
    Thanks in advance.
    Regards,
    Smith

    To preserve heading on each page for a HTML table you can use the THEADER, TFOOTER and TBODY tags (see example). To force page breaks, try experimenting with these style attributes:
    <STYLE TYPE="text/css">
         tr.breakhere {page-break-before: always}
    </STYLE>
    <tr class="breakhere">Table Example:
    htp.tableopen;
    htp.print('<THEAD style="display:table-header-group">');
    ... your table headers here
    htp.print('</THEAD>');
    htp.print('<TFOOT style="display:table-footer-group"><TR><TD></TFOOT>');
    htp.print('<TBODY>');
    ... your rows here
    htp.print('</TBODY>');
    htp.tableclose;Edited by: crokitta on Apr 8, 2009 2:07 PM

  • Output Mutiple Files Using htp.p

    Hello,
    I wish to output 3 CSV files from APEX I have the following code
    Declare
    S_FileName VarChar(20);
    S_Counter Number;
    begin
    -- Set the File NAme
    S_FileName :=To_char(sysdate,'yyyymmdd')||'Letters.CSV';
    For S_Counter IN 1..4 LOOP
    -- Set the MIME type
    owa_util.mime_header( 'application/octet', FALSE );
    -- Set the name of the file
    htp.p('Content-Disposition: attachment; filename="'||S_FILENAME||S_Counter|| '"');
    -- Close the HTTP Header
    owa_util.http_header_close;
    -- Loop through all rows in EMP
    for x in (select MPAN_CORE,ACCOUNT_NO
    from Categoriser.LTNA_LETTER_ONE_OUTPUT@link_to_dqmDevdb )
    loop
    -- Print out a portion of a row,
    -- separated by commas and ended by a CR
    htp.prn(x.MPAN_CORE ||','|| x.ACCOUNT_NO ||','||
    x.MPAN_CORE || chr(13));
    END LOOP;
    END LOOP;
    -- Send an error code so that the-- rest of the HTML does not render
    htmldb_application.g_unrecoverable_error := true;
    end;
    At this stage i only want to output 3 files the content is not a issue
    I it possible to do this with APEX?
    Any help on this is greatly appreciated.
    David

    I take it from the lack of response that this is not somthing that APEX can do?No, it's something that HTTP cannot do. Think about it: if it was possible for a server to send multiple files in response to an HTTP request, then it would be possible to break your computer very easily indeed.
    aww well looks like i will need to find another way..You'd need something in the browser client-side, Java applet, Flash control etc...

  • How to get full path using HTP.PRINT(' "input type ="file") ....

    Hello everybody,
    I am working on uploading file from page to another one using HTP package, but whenever I submit the form, it only takes the filename without the full path.
    for example :
    if i sent 'c:\dir\a.txt' , the other page receives file parameter as 'a.txt'
    the code is here
    PROCEDURE upload(appno in varchar2,wsct in varchar2) AS
    l_real_name VARCHAR2(1000);
    BEGIN
    HTP.htmlopen;
    HTP.headopen;
    HTP.title('Test Upload');
    HTP.headclose;
    HTP.bodyopen;
    HTP.header(1, 'Test Upload');
    HTP.print('<form action="https://ssltrng.uaeu.ac.ae/trng/document_api.upload1" method="get">');
    HTP.print(' File to upload: <input type="file" name="file" >
    HTP.print(' <input type="submit" value="Upload">');
    HTP.print('</form>');
    HTP.bodyclose;
    HTP.htmlclose;
    END upload;
    the other page see it as
    file is 'Water lilies.jpg'
    Thanks
    Edited by: dtabed on Mar 30, 2011 1:02 AM

    Do not understand the problem.
    The code you've posted is a PL/SQL web enabled procedure that produces a dynamic HTML page. This page contains a form. And a full URL reference to the CGI that will process the form's data.
    This is unusual - as it seems to be that the form is submitted across domains and web servers.. You usually refer to a local CGI procedure to deal with a form - no need for a fully qualified URL that includes web server and domain name.
    If the CGI procedure that receives the form is also a PL/SQL web enabled procedure, that the uploaded file will be placed in the documents table (as defined in the DAD alias) by mod_plsql, prior to the web enabled procedure being called. The documents table will contain the Mime type, file name, file contents and other details.

  • Htp.p doesn't work from the custom button event handler ...

    Hi,
    I am trying to pop up an alert from the custom button event handler. I created a button and put the following code.
    htp.p('<script language='JavaScript1.3">
    alert ("Test Message");
    </script>;
    But alter doesn't show up after clicking the button.
    Thanks

    OK i've attached them and copy/pasted the relevent parts. The parent window is the SFLB file.
    -----------------------------------------here's the code in the parent window
    private function editServerPool():
    void
    serverPoolPUW = PopUpManager.createPopUp(
    this,popups.ServerPoolPopup,true);PopUpManager.centerPopUp(serverPoolPUW
    as IFlexDisplayObject); 
    if (newServerPool.SecondarySPAlgorithm != null){
    serverPoolPUW.enableSSCheckBox.selected =true;serverPoolPUW.DisplaySecondaryServerPool();
    serverPoolPUW.bigResize.play();// serverPoolPUW.height = 602; //yes...i know i need to move thisserverPoolPUW.switchoverPolicyCB.selectedItem = newServerPool.SwitchOverPolicy;
    serverPoolPUW.switchoverThresholdTI.text = newServerPool.SwitchOverThreshold;
    ----------------------here's the code in teh popup window (popups.ServerPoolPopup.mxml)
    <mx:Resize id = "bigResize" heightFrom="506" heightTo="602" target="{this}" /> 
    <mx:Resize id = "littleResize" heightFrom="602" heightTo="506" target="{this}"/>
     public function DisplaySecondaryServerPool():void{
    //make the screen large if the secondary server checkbox is selected; otherwise small.  
    if (enableSSCheckBox.selected){
    //display secondary server pool tab, expand the screen 
    //note that we cannot attach a data provider to the data grid until the grid creation is  
    //completed. This is done in an event handler.secondaryPanel.enabled =
    true; switchoverPolicyCB.visible =
    true;switchoverThresholdTI.visible =
    true;thresholdFI.visible =
    true;policyFI.visible =
    true;bigResize.play();
    else
     <mx:CheckBox label="Enable a Secondary Server Pool" width="264" fontWeight="bold" click="DisplaySecondaryServerPool()" id="
    enableSSCheckBox" fontSize="12" x="83" y="40"/>

  • Oracle XE htp-package limitations?

    Hello,
    I'm developing a web application on my laptop Windows XP pro, Oracle XE 10 + apache + mod_owa. I had some serious issues with htp.p -calls, I'd keep getting this error message, no matter how small I made the htp.p -arguments
    Error 6502 calling procedure:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "SYS.HTP", line 1536
    ....I then started to wonder about this, and so I copied my packages to another machine (Windows server 2003, Oracle 10g, apache + mod_owa), compiled them and my error disappeared !
    Now is this some sort of limitation in Oracle XE, or what?

    Funny.. I'm sure that I submitted my response to this yesterday - but it does not show.
    Anyway, here it is again. No, there is no limitation I'm aware of - having tested the code below in XE. I have a procedure called WebCall that simulates a mod_plsql call. I've used this to test:
    SQL> create or replace type TStrings is table of varchar2(4000);
      2  /                                                         
    Type created.
    SQL>
    SQL> /
    Type created.
    SQL> create or replace procedure WebTest is
      2          cookie  OWA_COOKIE.cookie;   
      3  begin                                
      4          OWA_UTIL.mime_header('text/html', TRUE );
      5          cookie := OWA_COOKIE.get( 'SOME_CUSTOM_COOKIE' );
      6                                                          
      7          HTP.prn( 'What do you want, universe? (Klingon for "hello world")' );
      8          HTP.prn( '<hr>' );                                                  
      9          HTP.prn( rpad('0',3000,'1') );                                      
    10          HTP.prn( '<hr>' );                                                  
    11                                                                              
    12          if cookie.vals.First is NULL then                                   
    13                  HTP.prn( 'Cookie [SOME_CUSTOM_COOKIE] is not set' );        
    14          else                                                                
    15                  HTP.prn( 'Cookie [SOME_CUSTOM_COOKIE] is set to "'|| cookie.vals( cookie.vals.First )||'"' );
    16          end if;                                                                                             
    17                                                                                                              
    18          HTP.prn( '<hr>' );                                                                                  
    19                                                                                                              
    20          HTP.prn( 'You are connection from web browser: '|| OWA_UTIL.get_cgi_env( 'HTTP_USER_AGENT' ) );     
    21  end;                                                                                                        
    22  /                                                                                                           
    Procedure created.
    SQL>
    SQL> create or replace function WebCall( procName varchar2, queryString varchar2 default null ) return TStrings pipelined is
      2          nameList        OWA.vc_arr;                                                                                   
      3          valueList       OWA.vc_arr;                                                                                   
      4          htpBuffer       HTP.htbuf_arr;                                                                                
      5          bufRows         integer         := 99999999;                                                                  
      6          rc              integer;                                                                                      
      7  begin                                                                                                                 
      8          -- name-value list (typical CGI variables)                                                                    
      9          nameList(1) := 'HTTP_COOKIE';                                                                                 
    10          nameList(2) := 'HTTP_HOST';                                                                                   
    11          nameList(3) := 'HTTP_USER_AGENT';                                                                             
    12          nameList(4) := 'QUERY_STRING';                                                                                
    13          nameList(5) := 'REMOTE_ADDR';                                                                                 
    14          nameList(6) := 'REQUEST_METHOD';                                                                              
    15          nameList(7) := 'QUEST_URI';                                                                                   
    16                                                                                                                        
    17          valueList(1) := 'SOME_CUSTOM_COOKIE=123; SOME_OTHER_COOKIE=foo';                                              
    18          valueList(2) := 'localhost';                                                                                  
    19          valueList(3) := 'Mozilla/5.0; PL/SQL Interface';                                                              
    20          valueList(4) := nvl( queryString, 'param1=value1&pama2=value3' );                                             
    21          valueList(5) := 'localhost';                                                                                  
    22          valueList(6) := 'GET';                                                                                        
    23          valueList(7) := '/custom-web-service';                                                                        
    24                                                                                                                        
    25          -- initiliase OWA and configure a basic CGI environment                                                       
    26          DBMS_SESSION.reset_package;                     -- reset PL/SQL PGA maintaining package state                 
    27          rc := OWA.Initialize;                                                                                         
    28          OWA.init_cgi_env( 7, nameList, valueList );                                                                   
    29          htp.HTBUF_LEN := 255;                                                                                         
    30                                                                                                                        
    31          -- now call the web enabled PL/SQL procedure                                                                  
    32          execute immediate 'begin '||procName||'; end;';                                                               
    33                                                                                                                        
    34          -- return the output as rows                                                                                  
    35          OWA.get_page( htpBuffer, bufRows );                                                                           
    36          for i in 1..htpBuffer.Count                                                                                   
    37          loop                                                                                                          
    38                  PIPE ROW( htpBuffer(i) );                                                                             
    39          end loop;                                                                                                     
    40                                                                                                                        
    41          return;                                                                                                       
    42  end;                                                                                                                  
    43  /                                                                                                                     
    Function created.
    SQL> show errors
    No errors.     
    SQL>           
    SQL> col HTML_LINE format a80
    SQL>                        
    SQL> select                 
      2          rownum          as LINE_NO,
      3          b.column_value  as HTML_LINE
      4  from       TABLE( WebCall('WebTest') ) b
      5  /                                      
       LINE_NO HTML_LINE
             1 Content-type: text/html                                                        
             2 Content-length: 3176                                                           
             3                                                                                
             4 What do you want, universe? (Klingon for "hello world")                        
             5 <hr>                                                                           
             6 01111111111111111111111111111111111111111111111111111111111111111111111111111111
               11111111111111111111111111111111111111111111111111111111111111111111111111111111
               11111111111111111111111111111111111111111111111111111111111111111111111111111111
               111111111111111                                                                
    ..snipped..
            17 11111111111111111111111111111111111111111111111111111111111111111111111111111111
               11111111111111111111111111111111111111111111111111111111111111111111111111111111
               11111111111111111111111111111111111
            18 <hr>
            19 Cookie [SOME_CUSTOM_COOKIE] is set to "123"
            20 <hr>
            21 You are connection from web browser: Mozilla/5.0; PL/SQL Interface
    21 rows selected.
    SQL>The WebTest procedure writes a 3000 character string via HTP.PRN. It works fine.
    As it accepts a varchar2 parameter, it should be capable of accepting 32KB strings. Note that the size is byte size and not char size. When using a db with a multibyte char set, a single char consumes more than 1 byte of space and then obviously less chars can be send in a 32KB block.
    Also note that the limit for the SQL engine for varchar2 is 4000 bytes and not 32KB like the PL engine.
    Playing around with the WebCall code, the only time I ran into string size errors, was when changing the HTBUF_LEN parameter to greater than 255. My guess this is a limitation of how the call interface between OWA and mod_plsql has been designed. But this does not limit the actual size of the HTP.PRN to 255 - only the way the data is exchanged (note that the pipeline function returns the data from the HTP buffer in 255 char chunks.

  • Using htp.p in Apex 4.2.2 not working in plsql region after an upgrade?

    Hi
    After I upgraded Apex to 4.2, in a region PL/SQL  the code
    htp.p('test');
    not working and I've the error :
    is_internal_error: true
    apex_error_code: APEX.REGION.UNHANDLED_ERROR
    ora_sqlcode: -6502
    ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error
    component.type: APEX_APPLICATION_PAGE_REGIONS
    component.id: 15577009301937579
    component.name: Légende
    error_backtrace: ORA-06512: at "OAS10GR2.OWA_UTIL", line 328 ORA-06512: at "OAS10GR2.HTP", line 1322 ORA-06512: at "OAS10GR2.HTP", line 1397 ORA-06512: at "OAS10GR2.HTP", line 1689 ORA-06512: at line 1 ORA-06512: at "SYS.DBMS_SYS_SQL", line 1204 ORA-06512: at "SYS.WWV_DBMS_SQL", line 1064 ORA-06512: at "APEX_040200.WWV_FLOW_DISP_PAGE_PLUGS", line 4613 ORA-06512: at "APEX_040200.WWV_FLOW_DISP_PAGE_PLUGS", line 3220
    Thank you !

    Try using:
    sys.htp.p('test');
    Not sure why the synonym to HTP is referencing a HTP procedure owned by OAS10GR2 (OAS10GR2.HTP). 
    Did your upgrade complete successfully?

Maybe you are looking for

  • Track from iTMS plays in itunes, but not on iPod

    Five minutes ago, I purchased a track from the iTunes Music Store (Sunspot, by Moby). I downloaded the file, and it plays without a hitch in iTunes. When I sync my iPod, though, I find the track is not playable on the iPod. I can find and select it i

  • Uninstall itunes 11 and go back to 10.7

    Hi, wanted to uninstall itunes 11 to itunes 10.7 because I cannot stand the new layout, how do I go about that safely? I have not put any new songs on it since it has been updated so thats not an issue. please help, I hate it.Mac book pro 13 inch. 10

  • Regarding BADI's in ABAP

    Hi, Can anybody tell me What is meant BY <b>BADI's</b>! Also what are the main diffrences between <b>User-Exits and BADI's</b>! Can anybody explain me wether any diffrent types of <b>BADI's</b> are available! Can anybody provide me documentation with

  • Will there be a bottleneck with 16GB RAM and 32 threads CPU?

    And if so how much of a bottleneck? Is it worth the money to upgrade to 48GB? I have 8x2GB in the HP Z820, but was thinking of getting more RAM from Mr Memory that is compatible with the Z820 for much cheaper than what HP are selling HP branded ram f

  • Where is the xboxdrv configuration file?

    I'm using an Xbox 360 Afterglow wired USB controller. I've got xboxdrv installed and I got it working: Left joystick: mouse Right joystick seems to do nothing D-Pad seems to do nothing A is left-click B is middle-click X is right-click Not sure what