Dbms_output package on oracle apex

Hi
CREATE OR REPLACE PROCEDURE TEST_PROC
AS
V_FNAME EMPLOYEES.FIRST_NAME%TYPE;
BEGIN
SELECT FIRST_NAME INTO V_FNAME FROM EMPLOYEES
WHERE FIRST_NAME = 'JOHN';
DBMS_OUT.PUT_LINE(V_FNAME);
END;
begin
TEST_PROC;
end;
when we execute procedure like this how to get the output on result screen using DBMS_OUT.PUT_LINE(V_FNAME); sql worksheet of http://apex.oracle.com/ on my account
because set serveroutput on is not working here.
thanks

You don't use DBMS_OUTPUT in apex.
It has ways you can output html within the screen content if you really want (a google search would show you how), though Apex comes with a debug option so you can see what values things have without having to code your own.
Edit: Oh, and p.s. this is the SQL and PL/SQL forum, not the Application Express forum which is here: Oracle Application Express (APEX)
Edited by: BluShadow on 04-Nov-2011 11:05

Similar Messages

  • Create PDF from PL/SQL-Interface XML FOP / Oracle BI / Oracle APEX packages

    Hi All,
    I think this is perhaps the most often asked question. And people suggest using PL-FPDF or PL PDF. There is a constraint, I can't use PL PDF because of monetary reasons.
    I wish I could use some method to output PDF from the PL/SQL. I already have a document (word document stored as CLOB). Now, I need to output this file as PDF. I know doing this outside database is easy and advisable, but this what I have been asked to do.
    Is there any method of implementation, using either XML - FOP or Oracle BI publisher or Oracle APEX tools (and not Oracle APEX itself, I know how to do this if the application is built, run using Oracle APEX, but this is plain Oracle HTP).
    Database: Oracle 9.2 running in Windows server.
    Thanks in advance.
    Guru
    Edited by: guru paran on Oct 22, 2009 12:55 PM
    Added tags

    Apologies for that.
    I am looking into ways to use Apex. Like calling the FOP in Oracle OC4J server and generating PDF from it. As I told already, we have this application built on Oracle HTP, we can't move to Oracle Apex now. I can install Oracle APEX and use the tools it offers. No problem in that.
    PL-FPDF is free, but I can see this doesn't help much. What I have is CLOB, not data from table. :(
    I am just looking into different ways one can do this.

  • How to print new line using DBMS_OUTPUT package

    Hi,
    I am trying to print a new line using DBMS_OUTPUT package. but it do not print the new line.
    set serveroutput on size 200000
    set feedback on
    BEGIN
    DBMS_OUTPUT.PUT_LINE('First Line');
    DBMS_OUTPUT.PUT_LINE('');
    DBMS_OUTPUT.PUT_LINE('Second Line');
    END;
    I expect following output ...
    First Line
    Second Line
    but i got following output....
    First Line
    Second Line
    why DBMS_OUTPUT.PUT_LINE( '); is not printing a new line ?

    You can try the following:
    SQL> ED
    Wrote file afiedt.buf
      1  BEGIN
      2  DBMS_OUTPUT.PUT('ONE LINE...');
      3  DBMS_OUTPUT.PUT('SECOND LINE...');
      4  DBMS_OUTPUT.NEW_LINE;
      5  DBMS_OUTPUT.PUT_LINE('THIRD LINE WITH NEW LINE...');
      6  DBMS_OUTPUT.PUT('TEST');
      7  DBMS_OUTPUT.NEW_LINE;
      8  DBMS_OUTPUT.PUT_LINE('FOURTH LINE'||CHR(10)||'EXAMPLE');
      9  DBMS_OUTPUT.PUT_LINE(CHR(10));
    10  DBMS_OUTPUT.PUT_LINE('FIFTH LINE');
    11* END;
    SQL> /
    ONE LINE...SECOND LINE...
    THIRD LINE WITH NEW LINE...
    TEST
    FOURTH LINE
    EXAMPLE
    FIFTH LINE
    PL/SQL procedure successfully completed.Documentation:
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_output.htm#i1000062

  • Store table data in a tab separated file in oracle apex

    How to store table data in a tab separated file in oracle apex ?
    Suppose i have a table 'Table1' as shown below.
    id name
    1 x
    2 y
    I want to get the result 'select * from table1;' into a tab separated file in oracle apex.

    For client you could
    - invoke call to Oracle Reports, where an .rdf is ready to generate one for you
    - utilise download as csv option in interactive reports
    - call page that generates csv using htp package (CSV Download without Header, possible?
    - modify an interactive report to do a similar thing (http://www.talkapex.com/2009/04/custom-download-for-apex-interactive.html)

  • Digital Certificates and Web Services with Oracle APEX

    Hi people,
    I am working to implement Web Service communication using Oracle Apex. I need to create an application that calls an external public Web Service in Apex. So far, so good, and i am able to work with a public WS without any problems.
    However, this particular WS I'm calling has two peculiarities:
    1) It is SSL-Secured (HTTPS). This means i have to communicate using SSL and Public/Private Certificates.
    2) The message i pass (payload) must be digitally signed using XMLDsig Standard (www.w3.org/TR/xmldsig-core/)
    The first requirement i am still testing, but it will probably work if i import the public and private keys using Oracle Wallet and point to this Wallet, just as PayPal sample in OTN samples does, don't you think? Should i have any problems with this?
    The second one is more complicated, all APIs i have seen for XML Digital Signing are Java-based or .NET-based, i have found nothing based in PL/SQL packages or such. Can you point me some other options to sign this XML?
    Please bear in mind that, since the WS has more than one method, i am using plain old UTL_HTTP to call it (just like the PayPal sample in OTN). PayPal requests that all communication be SSL-enabled, but has no mention whatsoever for Digital Signatures.
    Can anybody help me out with this? any help is highly appreciated.
    Regards
    Thiago

    Thiago:
    You are correct in that there should be no problem interacting with a Web service that has an HTTPS endpoint as long as you create a wallet and specify it when you make your UTL_HTTP calls, like the PayPal example.
    I am not aware of a PL/SQL utility to create a XMLDsig Standard message, but if you find some Java source out there that does it, you may be able to follow a technique I used for a similar use case:
    http://jastraub.blogspot.com/2009/07/hmacsha256-in-plsql.html
    Regards,
    Jason

  • Handling of UTL_HTTP package in oracle 10.2.0.5 to 11.2.0.2

    Dear All,
    We are calling Web services using UTL_http through one of our custom package in Oracle 10.2.0.5 .. & it is giving correct result/output..
    But if we are calling web services using the same custom package from oracle 11.2.0.2 & it is giving us error..
    utl http handling in custom package as :
    soap_request :=
    '<?xml version = "1.0" encoding = "UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body>'
    || v_request_xml -- input xml that we are sending
    || '</SOAP-ENV:Body></SOAP-ENV:Envelope>';
    http_req :=
    UTL_HTTP.begin_request (fx_service_url, -- fx_service_url is URL web service which are calling
    'POST',
    'HTTP/1.1'
    UTL_HTTP.set_header (http_req,
    'Content-Type',
    'text/xml'
    UTL_HTTP.set_header (http_req,
    'Content-Length',
    LENGTH (soap_request)
    UTL_HTTP.set_header (http_req, 'SOAPAction', '');
    UTL_HTTP.write_text (http_req, soap_request);
    http_resp := UTL_HTTP.get_response (http_req);
    DBMS_OUTPUT.PUT_LINE('HTTP response status code: ' || http_resp.status_code);
    DBMS_OUTPUT.PUT_LINE('HTTP response reason phrase: ' || http_resp.reason_phrase);
    UTL_HTTP.read_text (http_resp, soap_respond);
    UTL_HTTP.end_response (http_resp);
    Output in 10g :
    HTTP response status code: 200
    HTTP response reason phrase: OK
    Output in 11g :
    HTTP response status code: 400
    HTTP response reason phrase: Bad Request
    Query :
    1. is there any difference of handling utl_http in oracle 10.2.0.5 to 11.2.0.2 ?
    2. we recently upgraded oracle database from 10.2.0.5 to 11.2.0.2.. is/are there any setting which we need to take care while passing xml from oracle database to web service ..?
    3. do we need to change any setting in we-services server also in case database upgraded from ..?
    Thanks,

    For SQL Developer, see my advices in Re: Oracle 10g - Chinese Charecter issue and Re: insert unicode data into nvarchar2 column in a non-unicode DB
    -- Sergiusz

  • Insert a record into a table through email in an Oracle APEX application

    I developed an Oracle APEX application, there is a table called events. I can insert/update/delete a record in the table through browser. I am thinking in order to quickly do the data entry, user should be able to send an email, then the table should be inserted with values from email address, timestamp, subject and body. Anyd idea how to realize this functionality?
    - Denis

    Start by checking whether your mail server provides any API's for accessing emails , if it does you might be able to reduce a lot of work by using some kind of web service consumer from apex to your mail server. In any case your implementation is going to be dependent on your Mail Server configuration.
    Your problem breaks down to reading/accessing mails from the mail server from PLSQL (apex is driven by PLSQL).
    I found this other thread which could be of some use.
    WAY TO ACCESS A MAIL SERVER FROM ORACLE APEX
    <li>The following package might solve your problem directly(from carsten czarski of the German Apex community)
    [url http://plsqlmailclient.sourceforge.net]http://plsqlmailclient.sourceforge.net
    PS: POP3 support is still TBD.
    <li>I also found this posting in the orafaq forums which lists a java method and PLSQL code bit for it for accessing emails via POP3
    [url http://www.orafaq.com/forum/t/80928/2/]http://www.orafaq.com/forum/t/80928/2/
    If these do not work for you, find some java library to read mail from your server, write a PLSQL wrapper for it and use it in a scheduled job(DBMS_JOB)/a PLSQL block triggered from Apex.
    If you get stuck there, find some utility that can read mails, invoke them from your DB using java,shell scrpt,dbms_scheduler etc and use the utility's function for the rest.
    NOTE: I haven't tried any of these utilities and you must validate any java code before running them on your environment.
    Since aren't really much restrictions(other than spam checks) in sending a mail to your mail account, you might want to consider filtering out the mails from which you create records.

  • Reading and Updating MS Active Directory (AD) through Oracle APEX

    Hi All,
    Has anyone ever read and update the AD components using Oracle APEX?
    I know we can have APEX build in LDAP Authentication, but that is for the Authentication, what about reading other attributes like phone no., department, office etc. from MS AD; and about updating the same information.
    Is Oracle Identity Management the only solution?
    Windows 2008 R2 Server provide SOAP based AD web services (ADWS), has anyone used that with APEX (11g R2 with EPG configuration)?
    Is it possible to have a C# code (through external procedure) which could read and write MS AD; can we use only "C" code in oracle as external proc or C# as well?
    Any pointers would be of great help.
    Thanks,
    Ash

    Ash,
    It's possible to query data from the LDAP server, but it's not as easy as you'd like. I don't know about updating, but fopr querying, you're looking at creating a package using DBMS_LDAP and a pipelined function to get the data. Here's one example from a quick google search; there are others.
    One thing to be aware of that burned me: the default LDAP setting limits requests to 1,000 records. If your search gives more than that, you get an error (and no data at all). So you may find yourself having to use unions to get the full data, which slows things down a bit.
    -David

  • Data Import in Oracle Apex

    Hi,
    I have a requirement to provide a screen to user where they can import data from excel to existing table and i have seen a functionality in Data Workshop in Oracle Apex, but i am unable to use that since i have additional things needs to added into that. The requirment is mentioned below,
    1) Need a screen where user can select the excel file and start importing to one temp table without any validation
    2) those temp table data should be visible in Multi row form format in screen and user should able to modify the data
    3) Need a mapping screen or functionality like where user can map the column from temp table to original table before moving the data to original table (like Data Workshop)
    4) Data should be moved to original table and respective data should be deleted from temp table ( In case if any error occurs, error record should be displayed in temp table until unless user corrected data and move to original table)
    5) Need to add different kind of validation like, update the record in original record if same id is available or insert a record, not null value etc..
    Please suggest me how do i achive this in Apex.
    Is there any way to use the existing data workshop fuctionality code and design in my new screen?

    You will probably have to code this all by yourself... There are some packages that have been written to import Excel files and CSV style files..
    Here is a blog entry on doing the Excel file upload: http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
    Once you call that you could have a tabular form display the data to the user..
    The other processes would need to be written by you (migrating data from temp table to live data table..
    Thank you,
    Tony Miller
    Webster, TX
    On the road of life...There are 'windshields', and there are 'bugs'
    (splat!)
    "Squeegees Wanted"

  • Oracle Apex Mail Send Issue.

    Fyi
    I am using oracle apex 4.2 version.
    i am trying to send mail using APEX_MAIL.send.
    My process like
    begin
    APEX_MAIL.send(
    p_to       => '[email protected]',
    p_from     => '[email protected]',
    p_body     => l_body,
    p_subj     => 'APEX_MAIL Package - Plain Text message');
    end;
    When i check mail queue from administrator part
    HomeManage > InstanceMail > Queue
    It show no error and after the send all mail still i am not geting the mail
    i also check my email setting in administrator part.
    Thanks

    Hi,
    I suggest that you put some debug statements to make sure that there no errors in the input parameters to the apex_mail.send procedure (http://docs.oracle.com/cd/E10513_01/doc/apirefs.310/e12855/apex_mail.htm#insertedID1). If possible, set up a simple example in apex.oracle.com and share the credentials.
    Thanks,
    Rohit

  • Ora-06502 pl/sql numeric or value error in Report Query in oracle apex

    Hello all,
    I need your help...
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    I am using bi publisher to generate PDF reports in oracle apex.
    We were using APEX 4.0 and migrated to 4.2 just a week ago.
    Now we have apex 4.2.
    When I try to Create report query,
    Shared Components >> Report Queries then create.
    and test a report in a create wizard I am getting a error "ORA-06502: PL/SQL: numeric or value error: character string buffer too small".
    I have also applied a patch "16760897".
    This issue is because of number of columns in a query is more then 26.
    If I run a report with 26 or less number of columns then the is working fine, otherwise getting this error.
    My before migration report queries working perfectly even now, but not new queries.
    This issue is also in apex.oracle.com.
    You can see
    Not working  - http://apex.oracle.com/pls/apex/f?p=619:4
    Working - http://apex.oracle.com/pls/apex/f?p=619:2:
    Please give a solution.
    Thanks you.

    check the DB version compatibility with apex 4 or your DB version to apex 4.0 support for upgrade!
    Oracle Application Express Installation Requirements for 4.0

  • How to pass a value to a bind variable in a query report in oracle apex

    Hi Guys,
    I have requirement to send weekly reports via email to some users. The users should receive their own records in the report. The user details is stored in a table. What I am planning to do is to create a report query in oracle apex to generate the report and then run a function/procedure via a scheduler to email the report to respective users. Now my query is ............. is it possible to pass a value (user name) to the report query to pull records of only that user? I know we can have bind variables in the report query but I have no idea how to pass a value for bind variables from a function/procedure.
    Can anyone help me on this issue or suggest a better approach?
    Thanks,
    San

    You need to use dynamic sql
    But please keep in mind that since you're using Oracle you may be better off posting this in some Oracle forums
    This forum is specifically for SQL Server
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Report in pdf format in oracle apex

    how can i save the contents of a form as a report in pdf format by clicking on tha print button in oracle apex???
    plz help if anyone knows tha solution
    Edited by: user9139675 on Mar 9, 2010 11:14 PM

    how can i save the contents of a form as a report in pdf format by clicking on tha print button in oracle apex???You may create a report and call it in an Apex process fired by press a button.
    in the process:
    l_utl_http := utl_http.request(l_url);
    where set l_url like:
    http://167.165.243.209/dev60cgi/rwcgi60?repdevi_key&server=Rep60&report=my_rpt.rdf&DESFORMAT=PDF&DESTYPE=FILE&DESNAME=/arch/chrisweb/devi/cache/my_rpt.PDF&BACKGROUND=YES&P_1=PC00980
    The generated pdf report my_rpt.PDF is kept at /arch/chrisweb/devi/cache/

  • How to call a package in Oracle

    I'm trying to call a package in oracle
    (this is the oracle way of calling it :
    begin pck$xl.get_year_low_high_to_date(:compid, 20010801 , 20020108 ",:year_low,:year_high,:year_average,:low_date,:high_date); end;)
    but i can't get it right.
    I'm new to package calling in Oracle from Java, till now i only worked with SQL statements without parameters of that kind, can someone help me with this?
    ps the ":compid" is a parameter i have to fill in and provide...
    thank you very much

    ok here is a test i do...
    but still doesn't work something about the bindvariables (check errorlog). I know a bit jdbc and i understant what you mean, but the problem is i don't know how this should go :(
    please advise
    import java.sql.*;
    import java.util.*;
    import java.text.*;
    import java.io.*;
    * @author  U97488
    public class test {
        public static void main(String[] args) {
            try{
                ConnectionSherpa cs = ConnectionSherpa.getInstance("ConnectionSherpa");
                Connection conn = cs.getConnObj();
                String sSQL = "begin?; pck$xl.get_year_low_high_to_date(?, 20010801, 20020801 ,:year_low,:year_high,:year_average,:low_date,:high_date); end;";
                CallableStatement stmt = conn.prepareCall(sSQL);
                stmt.setString(1, "BRU10");
                System.out.println(stmt.toString());
                if(stmt.execute(sSQL)){
                    System.out.println(stmt.getString(2));
            }catch (Exception e){
                e.printStackTrace();
    }StackTrace:
    java.sql.SQLException: ORA-06550: Regel 1, kolom 6:
    PLS-00110: Bindvariabele '1' is niet toegestaan in deze context..
            at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
            at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
            at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
            at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1451)
            at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:862)
            at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1839)
            at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1764)
            at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2354)
            at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:909)
            at com.kbcsecurities.taminoupdate.servlets.test.main(test.java:28)

  • How call procedure or package from Oracle BI Publisher 10.1.3.2.1

    Hi Gurus,
    I need to call a procedure or package from Oracle BI Publisher 10.1.3.2.1 by passing parameters, I do it because it would be easier to fill a table as the report that asks for is too complex (8 breaks, 5 dblinks, 20 tables, etc).
    I'm not using the Oracle XML. Review include the following solutions:
    Re: Stored procedures and dynamic columns
    Re: Is it possible to use Stored Procedures in BI Publisher GUI?
    Re: PL/SQL Stored Procedure w/ XML Template?
    But none of them useful for me was the level of complexity.
    Best regards.

    Hi Vetsrini,
    I write the sentence as it showed in the previous thread
    select from whc_kk_v2.whc_p_kk_publisher (pv_msgerror =>: msgerror,*
    pv_pro1 =>: prov_1,
    pv_pro2 =>: prov_2)
    run when I get the error BIP
    ORA-00933: SQL command not properly ended
    Show me I'm doing wrong, or who may be causing the error. I tried everything but does not leave, please your help.
    Best regards

Maybe you are looking for

  • Problem with nokia 6151:help me!!!

    hello, i have a nokia 6151 and i have any problem.... -when the mobilephone is starting is very slow and the screen si light on only for five seconds and after is light off. this phone haven't OS and i don't know because it have need more time for to

  • Report hanging (when try to modify the report)

    Post Author: aneel CA Forum: WebIntelligence Reporting Hi All, This becomes a longlosting issue for me Please anyone look into this. I have created one report with 6 global and 3 local filters, 12 local variables. When I try to modify the webi report

  • Can pp col headings act like freeze pane in excel

    Hi.  We run 2012 enterprise.  Can co headings on my pivot table scroll as freeze pane does in regular excel?  How?

  • IPad Won't Restore into new Update 3.2.2 And Can't Do Anything Now...

    Ok so my problem is when i plugged my ipad to restore and update to the new firmware update 3.2.2, everything was going smoothly, untill i got a error numbered 1014, Please help me i have tried everything many times, im trying to restore it in my mac

  • Snooze interval in Notification Centre

    In Mountain Lion you get iCal reminders en reminders from the app through notification centre. If you don't want to follow up immediately you can hit the snooze button. In Lion (10.7) you could set the snooze interval (e.g. 30 minutes, 1 hour, 2 hour