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 -

Similar Messages

  • Set page item from a stored procedure

    Dear reader
    We would like to have a stored procedure to run every 10 minutes. When the procedure starts, the user has to be warned that the update process is running.
    When the procedure is finished, the user should receive a message that the update process is finished.
    What I had in mind was to set a Page 0 item 'P0_REFRESH' and set his value depending on the status of the update. Then add a dynamic action with a change event. So everytime the value of this page item changes, the user will receive a correct message.
    Does anyone know if it is possible to set a page item from a stored procedure?
    Kind regards
    Xnni

    AndyPol
    I found a solution by querying the user_jobs table. In Apex, I created two page 0 items that hold the current status of the job (online, offline) and the old value of the job.
    Online of offline in the current status item is determined by a decode on "this_sec".
    The enext step was to include a html region in P0 that contains some javascript. This javascript will display a message when the values of the new status is different from the old status ;)
    Many thanks for bringing up the ideas.
    Greetz
    Xnni

  • 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

  • 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 ;
    -----------------------------------------------------------------------------------------------------------------

  • How to retrieve comments from one OfficeTask activity and use them in another OfficeTask activity for Multi level Approval sequential Workflow

    I'm designing a sequential site workflow using Visual Studio 2010 for Project Server 2010. In my case, I have following 6 stages in the workflow:
    1. InitialProposal Stage
    2. Approval Stage1 -- Needs approval from Approver Project Security Group Members1
    3. Rejection Stage
    4. Approval Stage2 -- Needs approval from Approver Project Security Group Members 2
    5. Execution Stage
    6. Completed Stage
    Requirement is workflow should move to Approval stage2 from Approval stage1  if approved by all members of Approver Project Security Group1and it should move to Rejection Stage even if a single member rejects it.
    Workflow should move from Approval Stage2 to Execution Stage if approved by all members of Approver Project Security Group2 and it should move back to Approval Stage1 on rejection by a single member of the group.
    I'm using inbuilt PSWApproval content type and OfficeTask activity for creating approval task for the group members at both stages.
    On task rejected in Approval stage2, task will be assigned again to Approval Stage1 and I want to show comments given by members of Approver Project Security Group2 to the members of Approver Project Security Group1 with this assigned task
    but I'm not able to retrieve comments from officeTask activity.
    My question is where exactly these comments are saved? how can we retrieve them and use them in another officetask activity? If this is not possible then what is the possible solution for meeting above mentioned business requirement?

    Hi Paul,
    Thanks for your suggestion.
    By comments field I'm assuming OfficeTask.Comments field. Problem is, this field is always null. I tried accessing this field in CheckExitCondition activity as well as in OnTaskCompleted but in both the cases, it was null only(I wrote comments while approving
    the task).
    I used a code activity within OnTaskCompleted activity and following code for accessing Comments and Description fields:
    public string officeComments;
            public string officeDescription;
            private void TaskCOmplete(object sender, EventArgs e)
                CodeActivity Sender = (CodeActivity)sender;
                Microsoft.Office.Workflow.Actions.OfficeTask ofctask1 = ((CompositeActivity)Sender.Parent).Parent as Microsoft.Office.Workflow.Actions.OfficeTask;
                officeComments = ofctask1.Comments;
                officeDescription = ofctask1.Description;          
    Please tell me if I'm doing anything wrong here, I'm very new to Workflows. Also, do I need to set any specific property of officeTask for retriving comments?
    Thank you

  • 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...

  • 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.

  • Creating Web service for PL/SQL Procedure with Complex Data Types

    I need to created web service for PL/SQL Procedure with Complex Data types like table of records as parameters, how do we map the pl/sql table type parameters with web service, how to go about these?

    Hello,
    When you are creating a service from a Stored Procedure, the OracleAS WS tools will create necessary Java and PL wrapper code to handle the complex types (table of record) properly and make them compatible with XML format for SOAP messages.
    So what you should do is to use JDeveloper or WSA command line, to create a service from your store procedure and you will see that most of the work will be done for you.
    You can find more information in the:
    - Developing Web Services that Expose Database Resources
    chapter of the Web Service Developer's guide.
    Regards
    Tugdual Grall

  • Hi, I would like to create a database from my numbers spreadsheet and create reports (like SQL). Is there a way?

    Hi, I would like to create a database from my numbers spreadsheet and create reports (like SQL). Is there a way?

    Numbers is a lightweight spreadsheet.  If you know sql you will know that it can handle many queries and is a real databases that can handle many thousands of records.  Number is not the correct tool.  You can make something that does something like a query but it is not truly a query.
    Can you share anything about the specific application and how much information there is in each record?  How many records (rows)?

  • How to set an Application Item from PL/SQL

    I am attempting to set an Application Item
    After login to my app, I want to retrieve a row from my SETTINGS table and populate some Application Items with the settings information so that I can
    display some of that settings information on every page.
    Just to start, I created one Application Item named F106_YEAR
    I then created a Shared Components Application Process which executes on New Session: After Authentication
    I created this process as an Anynomous PL/SQL block.
    declare
    aucyr varchar(4);
    begin
    select year into auctyr
    from settings;
    :F106_YEAR := aucyr;
    end;
    I've tried a couple of other Syntax tricks attempting to reference the Application Item F106_YEAR from within PL/SQL (like V('F106_YEAR') but nothing seems to be working.
    I'm sure that I am missing something simple. Can someone tell me how to set an Application Item from PL/SQL?
    Thanks in advance.

    I'm still doing something wrong because this is not working for me.
    I've tried both of the following versions as an Application Process set to run on New Session after Authentication:
    declare
    auction_year varchar(4);
    begin
    select year into auction_year
    from PBUUC.SETTINGS where rownum < 2;
    :F106_AUCTION_YEAR:=auction_year;
    end;
    and I also tried:
    declare
    auction_year varchar(4);
    begin
    select year into auction_year
    from PBUUC.SETTINGS where rownum < 2;
    APEX_UTIL.SET_SESSION_STATE (p_name, p_value);
    end;
    F106_YEAR is a global Item (shared components).
    The select statement works just fine in SQL*PLUS so I know that it is correct.
    If I run the debugger and log into the application, here is the output. Shouldn't I see my Application Process get called if it is set to run on New Session after Validation?
    My Application process is named RETRIEVE_AUCTION_SETTINGS
    0.01: A C C E P T: Request="P101_PASSWORD"
    0.01: Metadata: Fetch application definition and shortcuts
    0.01: alter session set nls_language="AMERICAN"
    0.01: alter session set nls_territory="AMERICA"
    0.01: ...NLS: Set Decimal separator="."
    0.01: ...NLS: Set NLS Group separator=","
    0.01: ...NLS: Set date format="DD-MON-RR"
    0.01: ...Setting session time_zone to -04:00
    0.01: NLS: wwv_flow.g_flow_language_derived_from=0: wwv_flow.g_browser_language=en-us
    0.01: Fetch session state from database
    0.02: ...Check session 695371898690095 owner
    0.02: ...Check for session expiration:
    0.02: ...Metadata: Fetch Page, Computation, Process, and Branch
    0.02: Session: Fetch session header information
    0.02: ...Metadata: Fetch page attributes for application 106, page 101
    0.03: ...Validate item page affinity.
    0.03: ...Validate hidden_protected items.
    0.03: ...Check authorization security schemes
    0.03: Session State: Save form items and p_arg_values
    0.03: ...Session State: Save "P101_USERNAME" - saving same value: "jps"
    0.03: Processing point: ON_SUBMIT_BEFORE_COMPUTATION
    0.03: Branch point: BEFORE_COMPUTATION
    0.03: Computation point: AFTER_SUBMIT
    0.03: Tabs: Perform Branching for Tab Requests
    0.03: Branch point: BEFORE_VALIDATION
    0.03: Perform validations:
    0.03: Branch point: BEFORE_PROCESSING
    0.03: Processing point: AFTER_SUBMIT
    0.03: ...Process "Set Username Cookie": PLSQL (AFTER_SUBMIT) begin owa_util.mime_header('text/html', FALSE); owa_cookie.send( name=>'LOGIN_USERNAME_COOKIE', value=>lower(:P101_USERNAME)); exception when others then null; end;
    0.04: ...Process "Login": PLSQL (AFTER_SUBMIT) wwv_flow_custom_auth_std.login( P_UNAME => :P101_USERNAME, P_PASSWORD => :P101_PASSWORD, P_SESSION_ID => v('APP_SESSION'), P_FLOW_PAGE => :APP_ID||':1' );
    0.06: ...Process "Clear Page(s) Cache": CLEAR_CACHE_FOR_PAGES (AFTER_SUBMIT) 101
    0.06: Nulling cache for application "106" page: 101
    0.00:
    0.00: S H O W: application="106" page="1" workspace="" request="" session="695371898690095"
    0.01: alter session set nls_language="AMERICAN"
    0.01: alter session set nls_territory="AMERICA"
    0.01: ...NLS: Set Decimal separator="."
    0.01: ...NLS: Set NLS Group separator=","
    0.01: ...NLS: Set date format="DD-MON-RR"
    0.01: ...Setting session time_zone to -04:00
    0.01: NLS: wwv_flow.g_flow_language_derived_from=0: wwv_flow.g_browser_language=en-us
    0.01: Application 106, Authentication: CUSTOM2, Page Template: 2904114531488186
    0.01: ...Session ID 695371898690095 can be used
    0.01: ...Application session: 695371898690095, user=JPS
    0.01: ...Determine if user "JPS" workspace "1040027630222986" can develop application "106" in workspace "1040027630222986"
    0.01: ...Check for session expiration:
    0.01: Session: Fetch session header information
    0.01: ...Metadata: Fetch page attributes for application 106, page 1
    0.01: Fetch session state from database
    0.02: Branch point: BEFORE_HEADER
    0.02: Fetch application meta data
    0.02: Computation point: BEFORE_HEADER
    0.02: Processing point: BEFORE_HEADER
    0.03: Show page template header
    0.03: Computation point: AFTER_HEADER
    0.03: Processing point: AFTER_HEADER     
    0.04: Computation point: BEFORE_BOX_BODY
    0.04: Processing point: BEFORE_BOX_BODY
    0.04: Region: Auction_Title F106_AUCTION_YEAR

  • Error using Page Items in PL/SQL Triggers

    Hello all,
    I am trying to use a page item value in my PL/SQl trigger statement.Following is my trigger
    create or replace TRIGGER "cts_apps_temp_insert"
    BEFORE INSERT ON CTS_APPS_TEMP
    FOR EACH ROW
    DECLARE
    vComputer_ID NUMBER;
    vTemp varchar(200);
    BEGIN
    select computer_id into vComputer_ID from cts_hardware_info where computer_name = v('P105_DEVICE_NAME');
    INSERT INTO CTS_SERVER_APP_CUSTOMER(SERVER_ID,DEPT_APP_REL_ID,TECHNICAL_MANAGER,FUNCTIONAL,APPLICATION_COORDINATOR,MODIFYUSERID,DATEOFMODIFICATION)
    VALUES (vComputer_ID,:NEW.DEP_APP_REL_ID,:NEW.TECHNICAL_MANAGER,:NEW.FUCNTIONAL_MANAGER,:NEW.APPLICATION_COORDINATOR,v('APP_USER'),sysdate);
    END;
    But am getting an error when I try to insert the data from the form
    ORA-01403: no data found ORA-01403: no data found ORA-06512: at "ESDBA.cts_apps_temp_insert", line 5 ORA-04088: error during execution of trigger 'ESDBA.cts_apps_temp_insert'
    Error Unable to process row of table CTS_APPS_TEMP.
    OK
    I tried printing the value of v('P105_DEVICE_NAME'); from a pl/sql block...It doesnt print anything..
    Can anyone please tell mw why the page item value is becoming null?
    Is there any other way I can use the Page item value in the trigger?
    Thanks in Advance,
    Nehal
    Edited by: user11122439 on Jun 23, 2009 11:27 AM

    Thanks for helping me out Tony.
    It is a single row form. But the same form is used many time to add records for that particular server..
    In the first form the user enters the server details. In the second form they need to associate applications with the server name they entered in the first form.
    They can add any number of such applications.
    The contenst in my form are
    Server_name: ( read only field populated by the name they entered in the first form)
    application_name:
    Manger1:
    Manager2:
    When the user clicks on add button the applcaition should be associated to the server he added in the first form.For this I need the Id of the Server_name he added in the first form.
    I also need to store this info in a temporary table apart from the original Server-App relationt able. Thats the reason I had database trigger which was also adding stuff to a temporary table apart from adding the relationships to the main table.
    But even if we frget about hte temporary table can you please tell me how I can use the Page item value in form 1 and get its id from database and use it to insert server-app relation in second form?

  • 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.

  • Can I import HTMLs from inside the project and use as portlet page ?

    As you know, I am using Java Studio Creator 2 Update 1 for my current portal project. I have created JSR-168 JSF Portlet Project for my portlet development.
    As I have some html pages ready for my development,
    Can I import HTMLs from inside the project and use as portlet page for my project?
    I did the followings steps:
    1: In side the project - File -> Add Existing Item -> Web Page ( imported test.html page from my local folder)
    2: Let it convert some of the tags for me ( so now it becomes - �test.jsp� )
    3: Set it to initial view.
    4. A default portlet page � newPortletPage.jsp is still there with no initial view.
    Now after doing this, No Visual Designer and Properties window available to for that �test.jsp� page. Though it allowed me to �build� the project successfully.
    When I build and run the portlet application, got the error message �Error occurred in portlet!� on Pluto Portal. Please advice.

    You do not open fcpproject files. You don't double click or anything else. The files have to be in the correct folder structure in the Final Cut Projects folder and the application opens them automatically. Can you post screen shots of the Final Cut Projects folder and its location.

  • How to create a stored procedure and use it in Crystal reports

    Hi All,
    Can anyone explain me how to create a stored procedure and use that stored procedure in Crystal reports. As I have few doubts in this process, It would be great if you can explain me with a small stored proc example.
    Thanks in advance.

    If you are using MSSQL SERVER then try creating a stored procedure like this
    create proc Name
    select * from Table
    by executing this in sql query analyzer will create a stored procedure that returns all the data from Table
    here is the syntax to create SP
    Syntax
    CREATE PROC [ EDURE ] procedure_name [ ; number ]
        [ { @parameter data_type }
            [ VARYING ] [ = default ] [ OUTPUT ]
        ] [ ,...n ]
    [ WITH
        { RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ]
    [ FOR REPLICATION ]
    AS sql_statement [ ...n ]
    Now Create new report and create new connection to your database and select stored procedure and add it to the report that shows all the columns and you can place the required fields in the report and refresh the report.
    Regards,
    Raghavendra
    Edited by: Raghavendra Gadhamsetty on Jun 11, 2009 1:45 AM

  • 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

Maybe you are looking for

  • Com.sap.tc.webdynpro.pdfobject.core.PDFObjectRuntimeException:

    Hi Everybody, This is the error regd Adobe forms I configured the ADs And Tested it,and the test was successful In the response,it has given the version number I tested it fom http://hostname:portno/AdobeDocumentServices/Config It is throwing the err

  • JRE 6 Update 31 upgrade issue

    Hello, My company uses a database application which is dependent on Java to run Stored Procedures and like from the Database Server. However, when our customers install Java 6 Update 31, the RT.jar file is removed after the restart at the end. When I

  • Export Numbers Document to Editable .pdf

    Forgive me if the answer is obvious, but I am a newbie to numbers. I have created a sales reporting form in numbers that I would like to host online or send out as a .pdf document. The problem is, I would like my clients to have the ability of enteri

  • ONKYO TX-SR805 Set-up Menu HELP Needed

    This is a LONG post, but I would appreciate if you would read it and respond to it.  The settings That are setup might not be the CORRECT settings.  If you think a different setting should be made, please let me know. Also right now I only have 2 fro

  • Error message on 1242 WAP

    I am trying to make a simple configuration change on an AIR-AP1242AG-A-K9 wireless access point.  When I try to save the change using the "copy run start" or "write mem" command I get the following error message after the unit trys to build the confi