Populating vo from pl/sql procedure and display on the scren in edit mode.

I want to show data in the page through dynamic vo.For that we have created a vo .inside the VOImpl file I have over write the executeQuery() and inside this method set all the values of the corresponding attributes.but when I run the page no data is comming in the page.Can any body help me to solve the problem.

Please post your question on the JDeveloper forum since this is not related to JHeadstart.
I also recommend you use the ADF BC Tester on your app module to test your VO, that is easier than generating a web page to test it.
Steven Davelaar,
JHeadstart Team.

Similar Messages

  • Creating page items from pl/sql procedure and using them on a page

    I have a page containing 2 select lists (P21_DEPARTMENTS and P21_DATE). Originally I added them as items that were "select list with submits". The problem is that based on the clearance level of the currently logged on user I only wanted the P21_DEPARTMENTS to be a select list if the user was an administrator. If however the user is not an admin then I want the page to have a hidden form field called P21_DEPARTMENTS that stores the user's department and has a label item that has the department name.
    There is also a report region that generates a table based on the department selected from the select list (if the user is an admin) or the value stored in the hidden form field if the user is not.
    My problem is that I cannot have both those items on the same page and use the HTML built-in authentication to determine which item should be rendered because I need to use the same ID for both items so that the stored procedure in my report region doesn't break. HTML does not permit items to share the same ID.
    I tried to circumvent the problem by creating a stored procedure that performs all of the item rendering in the procedure and uses "htp.p()" to output all of my HTML code. This solution would allow me to pass a parameter into the procedure informing me as to whether or not the user is an administrator. If the user is an administrator the procedure would use a conditional statement and render a select list. If not, the hidden form field and label option would be used instead.
    I finally got the stored procedure working perfectly. Now I am encountering the most bizarre thing. Since the "select list with submit" was not working (I used the same code that gets generated when I created other items using htmlDB's GUI) I decided to use a JavaScript function instead that gets triggered by the onChange event. I send along the value that is currently selected in the select list and in the function I set:
    location.href='http://www.myoraclesite.com/pls/htmldb/f?p=111:21:729740000000000000::NO::P21_DEPARTMENTS:1';
    In theory this should work. The problem is that it doesn't. The page reloads and the P21_DEPARTMENTS select list is not pre-selected.
    The only thing I can think of is that when htmlDB generates page items that you've created with it's own admin tool it assigns some internal guid or something as opposed to when someone tries to generate dynamic page items of their own from a pl/sql procedure it's like the application doesn't even know they exist.
    Any help would be GREATLY appreciated.
    My only other solution would be to create a totally separate page (one for admin and another for non-admin). I would really like to avoid this.
    Thanks in advance.

    I would love to be able to generate my menus and
    various other items in my htmlDB applications in much
    the same way I can using ASP, PHP and Cold Fusion.
    Users should have the ability to write server-side
    code wherever they feel like it. The way htmlDB works
    right now I spend more time trying to figure out how
    to create simple effects and generate simple
    interfaces when I need to be building a portal. Ami - it's important to understand that HTML DB is not like other languages. Thus, trying to force concepts which are common in other languages into HTML DB will often result in more work.
    It's definitely worth the time to go over the HTML DB 2-day Developer, which can be found here: http://www.oracle.com/technology/products/database/htmldb/pdf/B14377_01.pdf
    I can build a portal using Classic ASP, C#, PHP or Cold
    Fusion in like 1/10 of the time that it takes me to
    build one using htmlDB. I understand that this is not
    meant for the hard-core programmer but no web
    programming application in today's day and age should
    prevent experts from getting under the hood.And I can build a Portal in HTML DB in 1/10 the time it will take me to do it in any other language. It's like anything else - proficiency comes with practice and work.
    As for getting under the hood, there is plenty of places you can do that with HTML DB. Keep in mind that HTML DB itself is an HTML DB application, so the limits on what you can build with HTML DB are virtually limitless.
    Sorry for the vent there. After spending the last 2
    days trying to figure out how to implement such a
    straightforward thing and now being informed that it
    can't be done kind of bugged me.I understand your frustration, as I've been there before. My rule for beginners is that if you are writing more than a line or two of code in the first week, you're doing something wrong. Stop, take a break, and then use the ample resources (including searching this forum) to help solve your problem. There are plenty of resources available for you to learn about HTML DB on the HTML DB home page: http://otn.oracle.com/htmldb
    Good luck,
    - Scott -

  • VB code for executing pl/sql procedure, and displaying TABLE OUT parameter

    Does anybody have any sample VB code (using OO4O) for executing a PL/SQL stored procedure, and then displaying (in Excel preferably) the following OUT parameters from the procedure:
    (1) variable(s) of TYPE PL/SQL RECORD
    (2) variable of TYPE PL/SQL TABLE defined as TABLE%ROWTYPE
    (3) n variables of TYPE PL/SQL TABLE'S defined as table.column%TYPE;
    Thanks.

    Here is what we use to bring in arrays of data from plsql. Here will be some sample vba code and plsql.
    What the plsql need to run in an array of input dates and an array of ids to lookup for the dates (also needs the number of values in the arrray.
    vba code...
    Sub Bull()
    Dim oDoc As Object
    Dim oTable As Object
    Dim oCell As Object
    Dim ArrCtr As Integer
    Dim iCount As Integer 'Counter
    Dim DataDynaset As Object 'Dynaset for retrieved values
    Dim DischDataDynaset As Object 'Dynaset for retrieved values
    Dim TWDataDynaset As Object 'Dynaset for retrieved values
    Dim PDDataDynaset As Object 'Dynaset for previous day retrieved values
    Dim MSTssCodes As Variant ' TS Codes Array
    Dim NumRows As Integer 'Number of rows in the table
    Dim NumColumns As Integer 'Number of columns in the table
    Dim NumArrayVals As Integer 'Number of array values (actual number - 1)
    OraLogin
    NumRows = 83
    NumColumns = 11
    'One less than number because we start at 0
    'NumArrayVals = 5
    NumArrayVals = 117
    ReDim DateArr(NumArrayVals)
    MSTssCodes = Array(3398, 3406, 3391, 3385, 3413, 3378, _
    2254, 2254, 2254, _
    3398, 3406, 3391, 3385, 3413, _
    3460, 3455, 3450, 3447, 3505, 3444, 2254, 2254, _
    4974, 2803, 4735, 4719, 2837)
    ****** NOW THIS WILL GET READY TO SEND TO PLSQLGetData MSTssCodes, DateArr, DataDynaset, NumArrayVals + 1
    .... more suff in the sub
    Sub GetData(Tssids, DateArray, TmpDataDynaset, NumRetVals)
    'Retrieves data from the Oracle database
    Dim I As Integer 'Counter
    Dim TssidDynaset As Object 'Temporary array for Tssids
    Dim DateDynaset As Object 'Temporary array for dates
    OraDatabase.Parameters.addTable "TSCODES", 1, 68, NumRetVals, 0
    OraDatabase.Parameters("TSCODES").ServerType = ORATYPE_UINT
    OraDatabase.Parameters.addTable "DATES", 1, 12, NumRetVals, 0
    OraDatabase.Parameters("DATES").ServerType = ORATYPE_DATE
    OraDatabase.Parameters.addTable "VALS", 3, 2, NumRetVals, 0
    OraDatabase.Parameters("VALS").ServerType = ORATYPE_NUMBER
    OraDatabase.Parameters.Add "NUM_VALS", NumRetVals, 3
    OraDatabase.Parameters("NUM_VALS").ServerType = ORATYPE_NUMBER
    OraDatabase.Parameters.Add "ERR_NUM", 0, 2
    OraDatabase.Parameters("ERR_NUM").ServerType = ORATYPE_NUMBER
    Set TssidDynaset = OraDatabase.Parameters("TSCODES")
    Set DateDynaset = OraDatabase.Parameters("DATES")
    'Fill the arrays
    For I = 0 To NumRetVals - 1
    TssidDynaset.Put_Value Tssids(I), I
    DateDynaset.Put_Value DateArray(I), I
    Next I
    OraDatabase.DbExecuteSQL ("Begin DBCALLS.SELECT_VALUES (:TSCODES, :DATES, :VALS, :NUM_VALS, :ERR_NUM); End;")
    If OraDatabase.LastServerErr <> 0 Or OraDatabase.LastServerErrText <> "" Then
    MsgBox "Error Getting Data"
    End If
    Set TmpDataDynaset = OraDatabase.Parameters("VALS")
    'MsgBox (OraDatabase.Parameters("NUM_VALS") & " " & OraDatabase.Parameters("ERR_NUM"))
    OraDatabase.Parameters.Remove "TSCODES"
    OraDatabase.Parameters.Remove "DATES"
    OraDatabase.Parameters.Remove "VALS"
    OraDatabase.Parameters.Remove "NUM_VALS"
    OraDatabase.Parameters.Remove "ERR_NUM"
    End Sub
    Now here is the plsql called from the DBCALL package......
    --Select time series values for give ts_codes.
    PROCEDURE select_values (
    ts_codes IN IntArrayTyp,
    dates IN DateArrayTyp,
    vals IN OUT NumArrayTypIB,
    --quality   IN  OUT RawArrayTyp,
    num_vals IN INTEGER,
    err_num OUT INTEGER) IS
    BEGIN
    --initialize variables
    err_num := 0;
    FOR i IN 1..num_vals LOOP
    BEGIN
    SELECT value INTO vals(i)
    FROM table_name
    WHERE ts_code = ts_codes(i)
    AND date_time = dates(i);
    EXCEPTION
    WHEN OTHERS THEN
    --dbms_output.put_line (ts_codes(i) || ' ' || SQLCODE);
    vals(i) := -1.0;
    err_num := SQLCODE;
    END;
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    --dbms_output.put_line (tssid || ' ' || SQLCODE);
    err_num := SQLCODE;
    END select_values;

  • How to extract row_id from PL/SQL procedure and assign that to batch script

    Hello Team,
    I am stuck with a requirement, wherein I am running a batch script and within the batch script I am calling a procedure which inserts a record in a table (Including a column named l_id).
    I need this generated l_id to be passed on as a variable to batch script after PL/SQL procedure completion. So that I can refer this same l_id to update the same record in the table again in the same batch script in the later part.
    Looking for some suggestions!!!!
    Thanks
    -Vj.

    789153 wrote:
    I am stuck with a requirement, wherein I am running a batch script and within the batch script I am calling a procedure which inserts a record in a table (Including a column named l_id). Operating system? Scripting language or command shell used?
    I need this generated l_id to be passed on as a variable to batch script after PL/SQL procedure completion. So that I can refer this same l_id to update the same record in the table again in the same batch script in the later part.
    Looking for some suggestions!!!!Don't do this using batch scripts. Batch scripts are very much inferior compared to stored PL/SQL code when it comes to managing databases processes and performing data crunching.
    Why can't this be written entirely in PL/SQL? And execution managed from either DBMS_JOB or DBMS_SCHEDULER ? And before answering that, consider the following:
    - what is the superior language, PL/SQL or shell script?
    - what provides tighter integration with the database, PL/SQL or shell script?
    - what provides proper security and access control, PL/SQL or shell script?
    As you can call SQL*Plus from a shell script to run PL/SQL, you can call a shell script from PL/SQL instead to run external commands and processes.
    Use the right tool for the job. And shell scripting is an excellent tool - but only when correctly used. Are you using it correctly? I strongly doubt that...

  • How to open report in the browser from PL/SQL procedure

    Hi,
    I need to call the report (with destype = SCREEN) from the PL/SQL procedure and display in the browser.
    For Example: when I call P_call_report procedure in my Forms6i button or at sql*plus, the report output PDF/HTML should open in the Browser window.
    Iam Using IE, report6i, forms 6i, Oracle 8.1.7, Windows OS
    I tried using UTL_HTTP(' ') in a procedure. But when I execute the procedure at sql*plus it says Pl/sql procedure completed successfully message without opening report output in the browser window. If I copy the same url and paste it in the browser, it works.
    Please let me know if there is any solution.
    thanks alot.

    I guess event driven publishing may work. But Iam not sure about the opening of the browser from inside the procedure.

  • Creating web service from pl/sql procedure

    Hello.
    I need to create a web service from pl/sql procedure and i chose JDeveloper for this implementation. I have wsdl, but I never created web services. So, I created web service with document/literal message format.
    But I have several troubles:
    1. All element names have lower case letters.
    2. The SOAP envelope must begin from words soapenv:Envelope but i have soap:Envelope.
    3. And operation name has tail like "Element".
    I know bad way for implement 1 and 3 points. It's a modification of java_wsdl_mapping.xml and wsdl files. But if I want to add new method to my service all changes will be cleaned. It's not critical but inconvenient to support.
    But for point 3 i have no ideas.
    This task is very important for me. Can somebody help me?
    JDeveloper 10.1.3.3
    Regards,
    Aleksey

    http://www.oracle.com/technology/obe/obe1013jdev/10131/wsfromplsqlpackage/devwsfrom%20plsql.htm
    Frank

  • Returing array from PL/SQL procedure

    Hi,
    I am trying to return array from PL/SQL procedure. Heres is the code. I am getting an error "OracleParameter.ArrayBindSize is invalid ".
    Will anybody let me know what is wrong in following code. or does anybody have code to return PL/SQL array using VB.NET.
    oCommand.CommandText = "MyPack.TestVarchar2"
    oCommand.CommandType = CommandType.StoredProcedure
    Dim id As Integer = 10
    Dim deptname As String()
    Dim oParam1 As Oracle.DataAccess.Client.OracleParameter = New Oracle.DataAccess.Client.OracleParameter("id", Oracle.DataAccess.Client.OracleDbType.Int32)
    Dim oParam2 As Oracle.DataAccess.Client.OracleParameter = New Oracle.DataAccess.Client.OracleParameter("deptname", Oracle.DataAccess.Client.OracleDbType.Varchar2)
    oParam1.Direction = ParameterDirection.Input
    oParam2.Direction = ParameterDirection.Output
    oParam1.CollectionType = Oracle.DataAccess.Client.OracleCollectionType.None
    oParam2.CollectionType = Oracle.DataAccess.Client.OracleCollectionType.PLSQLAssociativeArray
    oParam1.Value = id
    oParam2.Value = ""
    oParam1.Size = 10
    oParam2.Size = 20
    oCommand.Parameters.Add(oParam1)
    oCommand.Parameters.Add(oParam2)
    oCommand.ExecuteNonQuery()
    Thanks
    Sameer

    Thanks Arnold for the reply..
    Yes, I am trying to get result set in array which is unknow to me (No of rows return by the query). For the test I will pre-define the result set so that I will able to set ArrayBindSize.
    I have read C# example but when I try to write it in VB.NET it gives me syntax error when I try to set the ArrayBindSize.
    oParam.ArrayBindSize = new int[3]{15,23,13} // individual max size of 3 outputsWill you please let me know how to set ArrayBindSize (VB.NET) because I am new to this..
    There is an example at otn "How to: Bind an Array to an ODP.NET Database Command" which does multiple INSERTs in one trip to database. This works fine. I need to do same for the SELECT statement which will return me multiple rows. I do not mean refCursor. If I use refCursor, it will make soft parse which I am trying to avoid using this Array techniq.
    Thanks
    Sameer

  • PL/SQL Procedure and Java

    Hi All,
    I am working on a Data Warehousing Product and generating Web Reports.
    These Web Reports are JSPs.
    The basic architechture used for this is :
    1. Get the inputs required for Report Generation through a Web GUI
    2. Validate and Process (If Valid) the inputs so that it can be applied on the Data in the DB to fetch appropriate information.
    3. The Data from the DB is retreived in the form of PL/SQL Procedures, which take the Processed information from Step 2 as Input and give the Output in the form of REF CURSORS.
    Note: There are a many PL/SQL Procedures that are being executed, based on the configuration the Client has set. This configuration enables the Client to set the columns he wants to see in the Web Reports. This configuration is set before the Reports are run.
    4. A call is made from Java to Oracle, each time a PL/SQL Procedure need to be executed. The REF CURSOR received as an Output from the PL/SQL Procedure is processed.
    5. The next PL/SQL Procedure is called (if existing), else the Processed Data (from REF CURSOR Output) is displayed in the JSP as Web Reports.
    The issue with above architechture is the PERFORMANCE.
    I would like to know:
    - The various ways in which data can be EFFICIENTLY & QUICKLY retrieved from PL/SQL Procedure in Java.
    - Are there any APIs that improve the Java-Oracle Data Fetch Efficiency
    - Is there any Java Framework available that can be used to increase the spped of Web Report generation.
    - Do you suggest any changes in the above mentioned architechture, that make this work a Sweet Sixeen Year olg guy! ;)
    - In general, any input that can increase the Speed of Web Report Generation.
    Kindly let me know if I have not been clear at any point, so that I can re-explain the same more clearly.
    And the most important thing, kindly scrap down your thoughts about the same.
    Thanks a lot in advance for your VALUABLE INPUTS.
    - Vikas

    Spring
    http://www.springframework.org/
    http://static.springframework.org/spring/docs/2.0.x/reference/jdbc.html
    http://static.springframework.org/spring/docs/2.0.x/reference/jdbc.html#jdbc-StoredProcedure

  • Run report from PL/sql procedure

    Please any one tell how to I run a report from pl/sql procedure.

    I am not sure, but depending on your environment you can create a script to run your PL/SQL code and then generate the report. As is customary in an UNIX environment utilizing shell scripts.

  • How to call javascript function from PL/SQL procedure

    Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?

    Hi,
    I have a requirement to call Javascript function inside a After Submit Process.
    clear requirement below:
    1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
    2. user clicks on "save files" button
    3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
    Hope this clarify U.
    Krishna.

  • TTClasses interface for PL/SQL procedure and fetching its results

    Hi experts,
    I am using TimesTen Release 11.2.1.3.0;
    I created a simple PL/SQL procedure as follows in timesten-
    Command> create or replace procedure employee(eno in emp.empno%type) is
    > e_name emp.ename%type;
    > begin
    > select ename into e_name from emp where emp.empno = eno;
    > dbms_output.put_line(e_name);
    > end;
    > /
    And then I call it through TTClasses as
    TTCmd cmd, compilecmd;
    compilecmd.Prepare(conn,"alter procedure employee compile;",status);
    cmd.Prepare(conn,"begin employee(1020); end;",status);
    cmd.Execute(..);
    cmd.FetchNext(..);
    Here fetchNext is returning an error -
    [TimesTen][TimesTen 11.2.1.3.0 ODBC Driver]Invalid cursor state
    *** ODBC Error/Warning = 24000, TimesTen Error/Warning = 0
    *** Unable to fetch row for statement: <begin employee(1020); end;>.terminate called after throwing an instance of 'TTError'
    Aborted
    How can I run PL/SQL procedures/functions on TimesTen through TTClasses interface?
    Any help or input would be of great value.
    Thanks

    The issue here is nothing to do with TTClasses. Your PL/SQL procedure executes a SELECT statement (that returns just one row) using an implicit cursor within the PL/SQL procedure and retrieves the value of the ename column into the PL/SQL variable. However it does not them do anything with that value such as pass it back to the caller...
    Similarly, the TTClasses code executes a statement that it is expecting to create an ODBC level cursor 9which thsi PL/SQL invocation will not of course) and it is then trying to fetch from a cursor that does not exist.
    I would recommend that you take a look at the TimesTen PL/SQL documentation (Oracle® TimesTen In-Memory Database PL/SQL Developer's Guide Release 11.2.1) and refer to the section on IN, OUT and IN/OUT parameters. This will show you how you can use OUT parameters to return values to the caller. This technique works fine for ODBC, JDBC and OCi programs but does not sadly currently work with TTClasses. TTClasses has not yet been enhanced to support OUT and INOUT parameters. Of course as you have the source code for TTClasses you could make the necessary modifications yourself.
    I will open a bug requesting that TTClasses support OUT and INOUT parameters but in the meantime if you need this kind of capability you will need to either modify TTClasses yourself or switch to using a different API.
    Chris

  • Redirect From PL/SQL Procedure

    Hi
    I hope this is a relatively straightforward question, but I am having trouble getting a page redirect to work from a PL/SQL procedure.
    I call the following procedure:-
    CREATE OR REPLACE PROCEDURE DOWNLOAD_FILE(p_id NUMBER) AS
    v_mime VARCHAR2(200);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    lob_loc BLOB;
    v_session VARCHAR2(100);
    BEGIN
    v_session := v('SESSION');
    SELECT MIME_TYPE,
    FILE_CONTENT,
    FILE_NAME,
    DBMS_LOB.GETLENGTH(FILE_CONTENT)
    INTO v_mime,
    lob_loc,
    v_file_name,
    v_length
    FROM SRGSUP_UPLOADED_FILES
    WHERE ID = p_id;
    owa_util.mime_header(nvl(v_mime,'application/octet'),FALSE);
    htp.p('Content-length: ' || v_length);
    htp.p('Content-Disposition: attachment; filename="' || v_file_name || '"');
    owa_util.http_header_close;
    wpg_docload.download_file(lob_loc);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    htp.p('Location: f?p=107:30');
    END DOWNLOAD_FILE;
    From the following HTML Expression in column formatting of a report:-
    #FILE_NAME#: [ <a href="#OWNER#.DOWNLOAD_FILE?p_id=#FILE_ID#">Download</a> ]
    When the table SRGSUP_UPLOADED_FILES contains the relevant document the file download works perfectly. However, if there is no file present I wanted the page to redirect back to itself. Instead it goes to the login page.
    Initially I thought it was losing the session details so I tried "htp.p('Location: f?p=107:30:'||v('SESSION'));" but this made no difference.
    Any help would be appreciated.
    Thanks
    Chris
    Message was edited by:
    chrisjcoe

    Hi
    <p>I hope this is a relatively straightforward question, but I am having trouble getting a page redirect to work from a PL/SQL procedure. </p>
    <p>I call the following procedure:- </p>
    CREATE OR REPLACE PROCEDURE DOWNLOAD_FILE(p_id NUMBER) AS
    v_mime VARCHAR2(200);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    lob_loc BLOB;
    BEGIN
      SELECT MIME_TYPE,
             FILE_CONTENT,
             FILE_NAME,
             DBMS_LOB.GETLENGTH(FILE_CONTENT)
      INTO v_mime,
           lob_loc,
           v_file_name,
           v_length
      FROM SRGSUP_UPLOADED_FILES
      WHERE ID = p_id;
      owa_util.mime_header(nvl(v_mime,'application/octet'),FALSE);
      htp.p('Content-length: ' || v_length);
      htp.p('Content-Disposition: attachment; filename="' || v_file_name || '"');
      owa_util.http_header_close;
      wpg_docload.download_file(lob_loc);
      EXCEPTION WHEN NO_DATA_FOUND THEN
      htp.p('Location: f?p=107:30');
    END DOWNLOAD_FILE;
    <p>From the following HTML Expression in column formatting of a report:- </p>
    [pre]
    "#FILE_NAME#: [ <*a h*ef="#OWNER#.DOWNLOAD_FILE?p_id=#FILE_ID#">Download</*a> ] "I've only put an "*" in <*a and </*a> to stop it changing into a url.
    <p>When the table SRGSUP_UPLOADED_FILES contains the relevant document the file download works perfectly. </p>
    <p>However, if there is no file present I wanted the page to redirect back to itself. Instead it goes to the login page. </p>
    <p>Initially I thought it was losing the session details so I tried "htp.p('Location: f?p=107:30:'||v('SESSION'));" but this made no difference. </p>
    <p>Any help would be appreciated. </p>
    <p>Thanks </p>
    <p>Chris</p>

  • Sending message from PL/SQL procedure to form

    Hello Friends,
    How can I send messages from PL/SQL procedure to Form ?
    Ultimate target is catching progress of PL/SQL procedure from
    form. I heard about DBMS_PIPe but not sure,.
    Adi

    Hello,
    Yeah , I got the solution using DBMS_PIPE function,I
    followed following steps.
    1. Pipe is created. see below procedure.
    create or replace procedure proc_testpipe as
         v_pipe_integer          integer;
         v_pipe_message          integer;
    begin
         v_pipe_integer := DBMS_PIPE.Create_Pipe('adipipe');
         dbms_pipe.pack_message('Hello Adinath Kamode,Message
         from Pipe');
         v_pipe_message := dbms_Pipe.Send_message('adipipe');
         end;
    end;
    2. then I created one Function which will obtain message from
    Pipe and
    will return value to form.
    create or replace function proc_callpipe return varchar2 as
    v_msg          integer;
    v_rem          integer;
    v_message          varchar2(500);
    begin
    v_msg:=dbms_pipe.receive_message('adipipe');
    dbms_pipe.unpack_message(v_message);
    dbms_pipe.purge('adipipe');
    v_rem := dbms_pipe.remove_pipe('adipipe');
    return(v_message);
    end;
    3. Last I called this function from form.
    Cheers .. !
    Adi

  • Exit from Pl/SQL procedure if first cursor failss?

    How to exit from q PL/SQL procedure. I have number of cursors defined in PL/SQL procedures and i want to exit if the first cursor does not return any rows

    open firstCursor;
    Fetch/Bulk Fetch from first cursor;
    IF firstCursor%found then
       "Do all the normal other stuff"
    end if;

  • Creating Excel Workbook from PL/SQL Procedure

    I am trying to create Excel Workbook with two worksheets from PL/SQL procedure. I created one worksheet. Can I create a separate sheet from same procedure. I used OWA_UTIL.MIME_HEADER ('application/vnd.ms-excel', FALSE)
    command to create the spreadsheet.
    Any help would be helpful.
    Thanks
    Yagna Shah

    Further to my previous post here is how I will develop a typical master details excel report.
    by using the package,
    It will also show sum of salary at each department.
    Note : When I paste the code here I loose the indentation. So the code below is not indented properly.
    DECLARE
    r NUMBER := 0 ; --- r IS the ROW NUMBER IN this excel file
    l_sum NUMBER ;
    BEGIN
    --- Generate the styles that we need
    gen_xl_xml.create_excel( 'UTL_DIR','master_Detail.xls') ;
    gen_xl_xml.create_style( 'dept_title' , 'Arial', 'Red',14, p_backcolor => 'LightGray' );
    gen_xl_xml.create_style( 'sgs2' , 'Arial', NULL ,10, p_bold => TRUE );
    gen_xl_xml.create_style( 'sgs3' , 'Arial', 'blue',14 );
    gen_xl_xml.create_style( 'sgs4' , 'Arial', 'green',14 );
    gen_xl_xml.create_style( 'emp_title' , 'Arial', 'Black',9, p_backcolor => 'LightBlue' );
    gen_xl_xml.create_style( 'sal_tot' , 'Arial', 'Brown',13, p_backcolor => 'Yellow' );
    -- SET ANY COLUMN AND ROW changes
    gen_xl_xml.set_column_width( 3, 145 );
    gen_xl_xml.set_column_width( 4, 145 );
    l_sum := 0 ;
    FOR recd IN ( SELECT department_id, department_name FROM departments ) LOOP
    IF l_sum <> 0 THEN
    r := r +1 ;
    gen_xl_xml.write_cell_char( r, 4, 'Department Total ->' , 'sal_tot' );
    gen_xl_xml.write_cell_num( r, 5, l_sum , 'sal_tot' );
    l_sum := 0;
    END if ;
    r := r+1 ;
    gen_xl_xml.write_cell_CHAR( r,1, 'Department : '|| recd.department_name , 'dept_title' );
    -- As we need same style applied till the above data flows use write_cell_null
    gen_xl_xml.write_cell_NULL( r,2 , null );
    gen_xl_xml.write_cell_NULL( r,3, 'dept_title' );
    gen_xl_xml.write_cell_NULL( r,4, 'dept_title' );
    gen_xl_xml.write_cell_NULL( r,5, 'dept_title' );
    --- Add employee heading
    r := r+1 ;
    gen_xl_xml.write_cell_CHAR( r,2, 'EmployeeID' , 'emp_title' );
    gen_xl_xml.write_cell_CHAR( r,3, 'First Name' , 'emp_title' );
    gen_xl_xml.write_cell_CHAR( r,4, 'Last Name' , 'emp_title' );
    gen_xl_xml.write_cell_CHAR( r,5, 'Salary' , 'emp_title' );
    FOR rec IN (SELECT employee_id , first_name , last_name, salary FROM employees WHERE department_id = recd.department_id ) LOOP
    r := r+1 ;
    gen_xl_xml.write_cell_num( r,2, rec.employee_id, 'sgs2' );
    gen_xl_xml.write_cell_char( r,3, rec.first_name, 'sgs3' );
    gen_xl_xml.write_cell_char( r,4, rec.last_name , 'sgs4' );
    gen_xl_xml.write_cell_num( r,5, rec.salary );
    l_sum := l_sum + rec.salary ;
    END LOOP ;
    END LOOP ;
    gen_xl_xml.close_file ;
    END ;
    -----------------------------------------------------------------------------------------------------------------

Maybe you are looking for

  • ALV Class Double click event

    Hi All, I have created an alv report using alv class. I have handled the double click event in that i am calling transaction using row currenlty selected. But after doing subtotalling the list and then i double click a line it is passing wrong data.

  • Lync 2013 SP1 64 bit crashes on Windows 7 Enterprise 64bit SP1

    Systems Involved: Dell OptiPlex 9020 All in One (080) –Crashes Lync 2013 64bit SP1 Dell OptiPlex 9020 All in One (081) –Crashes with Lync 2013 64bit SP1   -Working okay with 2010 so far  Dell OptiPlex 9020 All in One (083) –Clean install Seems to be

  • Error while transporting table entries to QA

    Hi All, I am working on system 4.6C i have a ztale with 3 key fields. I have added entries in table sucessfully. While imprting to Quality system. key field1   2183 Key field2  A Key field3  CHF It returns an return code with message called 'key of t

  • User self service

    Hi all. I want to enable user self service for OID entries. Has anyone seen a way to secure the OID entry such that they can only update their own details or even those within a group (for administrators). Any advice/ downloads appreciated. We can't

  • Total Deletion of Sales Records

    1. If a company has a requirement to delete all the finished sales transaction (from SO, DO and DR), is that possible? I mean total deletion and not just reversal. 2. If you are successful on reversing a "sales order" document, is it possible to dele