In a table - looping through the rows and the stored procedure call

APEX version: 3.2.0.00.27

Hello

I searched the forum and tried a few things but could not make it work.

I have a tabular presentation, developed with the help of the ATD (Cascading LOV - method of tabular presentation - AJAX - ATD )

What I'm trying to do now:
-After submit and validations, loop through all the lines and
-call a stored procedure passing 3 parameters obtained from each of the lines on the form of tables. This procedure will be an update of a database table.

On the forum, I found that I could do the loop "* FOR i IN 1..." APEX_APPLICATION.g_f03. "LOOP COUNT *" syntax.

Only for testing purposes, I tried just to view information with the following (On Load - after a footer) process (example of Denes Kubicek == > http://deneskubicek.blogspot.com/2009/05/execute-javascript-throuhg-plsql.html):
declare
  v_today  varchar2 (200);
begin
--  :P40_test := APEX_APPLICATION.g_f03(1);
--  :P40_test2 := APEX_APPLICATION.g_f04.COUNT;
  :P40_test2 := 100;

  v_today := to_char (sysdate, 'dd.mm.yyyy');

--FOR i IN 1.. APEX_APPLICATION.g_f03.COUNT LOOP 

  :P40_test := APEX_APPLICATION.g_f02(2);

  HTP.p ('<script type="text/javascript">');
  HTP.p (   'alert(''Today is '
          || v_today
--          || APEX_APPLICATION.g_f04(APEX_APPLICATION.g_f03(i))
          || '.\n'
          || 'end!'');'
         );
  HTP.p ('</script>');

--    :P40_test := APEX_APPLICATION.g_f02(APEX_APPLICATION.g_f02(i));

--END LOOP;

end;
The foregoing would give me a ' * ORA-01403: no data found * ' message. I tried through various variants of APEX_APPLICATION.g_f0* #*, but still can't get anything to display correctly. In commenting on all the lines referring to APEX_APPLICATION.g_f0x above, the date would be are they displayed fine.

I tried uncomment the FOR... LOOP and play with the code (defining the process runs "On submit - after calculations" and Validations), I got was a ' * ORA-06502: PL/SQL: digital error or value: character conversion number error * "message.

Here is the script of the form in a table:
select 
"V"."MSLINK",                                       -- hidden (number)
"V"."INSTALLATION_DATE",                        -- editable date picker
"V"."MANUFACTURER_INDICATOR",              -- editable (cascading LOV -- text)
"V"."MODEL_INDICATOR",                           -- editable (cascading LOV -- text)
"V"."DIAMETER_INDICATOR",                      -- editable (LOV -- number)
"V"."PURPOSE_INDICATOR",                        -- editable (LOV -- text)
"V"."VALVE_NUMBER",                                -- shown but not editable -- number
"V"."MODIFY_DATE",                                  -- shown but not editable
"V"."MODIFY_USER",                                   -- shown but not editable
"V"."VALVES_STYLE"."FEATURE"                  -- shown but not editable -- number
from "#OWNER#"."VALVES" "V"
Where
  "V"."PROJECT_ID" = :P1_PROJECT_NUMBER AND
  "V"."VALVES_DFLAG" = 0
Regarding the parameters for the stored procedure, it would the MSLINK, VALVE_NUMBER and the VALVES_STYLE. FEATURE.

Help, please!
(Sorry for the long post).

Thank you

Tan

Hi, Tan,

I have not seen that type of object - I've only used custom types for purposes of test years ago and have never used their within Apex!

One possibility is that the value of checksum being is based on all of the content of these fields, rather than only the part of the FEATURE. If there are other parts of the object, you could include those items as well.

Otherwise, as you f01 KP for a record, you will need to retrieve the values of the FUNCTION in your PL/SQL code directly from the table (because the user cannot modify these fields, you can be sure that the values in the table will be still valid).

Andy

Tags: Database

Similar Questions

  • The stored procedure call Fail

    I don't know that this is probably a simple answer, but please bear with me.

    I have a page

    defaulredirect.asp

    It receives form default.asp variables'

    I need to use form variables in my stored procedure. My procedure works fine in SQL, but when I try to add it as a command, it does not work.

    I'm not sure what I'm doing wrong. I am not sure what details you need. Please be patient with me.

    The procedure inserts the form in table variables and returns the identifier of the newly created (identity) for later use in my application.

    Your stored procedure has 7 settings, but you have created 8 in your asp code? What is 'cmdInsertRecord.CreateParameter ("@RETURN_VALUE", 3, 4) '?  I see that in your stored procedure. The parameters, including the order of their creation, must match exactly.  I've never used a type of return value so I don't know how it is used. I'll research, but in the meantime, try to comment on this possibility and see if it runs.

  • Return more than an OUT parameter of the stored procedure called in sql

    I searched for it, but maybe that I did a good job. I would return two parameters of a stored procedure that is called from an sql query. Something like
    select my_proc(in_param) from dual
    When the results of the query will return 2 columns. It is guaranteed in my design in order to return only a single record.

    Is this possible?

    The version of Oracle that I use is:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bi
    PL/SQL Release 10.2.0.2.0 - Production
    "CORE     10.2.0.2.0     Production"
    TNS for Linux: Version 10.2.0.2.0 - Production
    NLSRTL Version 10.2.0.2.0 - Production

    Is this possible?

    Laughing out loud
    You can not call a stored SQL procedure. Only functions can be called from SQL.

  • Y at - it a syntax better/more runs to get data to and from stored procedures?

    To test the stored procedure call, I created a simple package

    create or replace package TEST_PROCEDURES as
    
    procedure Test1 (
       arg1 in number,
       arg2 in number,
    
       res1 out number,
       res2 out number);
    
    end;
    
    

    and a page with fields number four (P1_INPUT_2, P1_OUTPUT_1, P1_INPUT_1, P1_OUTPUT_2) and a button excuting the code following PL/SQL:

    declare
      arg1 integer;
      arg2 integer;
      res1 integer;
      res2 integer;
    begin
      arg1 := :P1_INPUT_1;
      arg2 := :P1_INPUT_2;
    
      TEST_PROCEDURES.Test1(arg1, arg2,
                            res1, res2);
                        
      APEX_UTIL.SET_SESSION_STATE('P1_OUTPUT_1', res1);
      APEX_UTIL.SET_SESSION_STATE('P1_OUTPUT_2', res2);
    end;
    
    

    It works, but it looks like a lot of unnecessary code to me. Any suggestions?

    TryingAPEX wrote:

    To test the stored procedure call, I created a simple package

    create or replace package TEST_PROCEDURES as

    procedure (Test1

    in number arg1,

    arg2 in number,

    RES1 number,

    Res2 number);

    end;

    and a page with fields number four (P1_INPUT_2, P1_OUTPUT_1, P1_INPUT_1, P1_OUTPUT_2) and a button excuting the code following PL/SQL:

    declare

    whole arg1;

    Whole arg2;

    integer res1.

    whole Res2;

    Start

    arg1: =: P1_INPUT_1;

    Arg2: =: P1_INPUT_2;

    TEST_PROCEDURES. Test1 (arg1, arg2,

    RES1, res2);

    APEX_UTIL. SET_SESSION_STATE ('P1_OUTPUT_1', res1);

    APEX_UTIL. SET_SESSION_STATE ('P1_OUTPUT_2', res2);

    end;

    It works, but it looks like a lot of unnecessary code to me. Any suggestions?

    Why would you do that? APEX may be referenced in the same way as all the other bind variables (although it is worth noting that their type is always VARCHAR2, so in this case, it will rely on the implicit conversion):

    begin
      test_procedures.test1(:p1_input_1, :p1_input_2, :p1_output_1, :p1_output_2);
    end;
    

    For the previous discussion on this topic, see set manually with PL/SQL session state .

    Always advanced postal code using the functionality of the syntax highlighted in the editor.

  • I want to loop through the data from two different tables using for loop where the query should be replaced at runtime, please help me

    I have the data into two table with the structure of similar column, I want to loop through the data in these two tables

    based on some condition and runtime that I want to put the query in loop for example, the example is given, please help me

    create table ab (a number, b varchar2 (20));

    Insert into ab

    Select rownum, rownum. "" sample "

    of the double

    connect by level < = 10

    create table bc (a number, b varchar2 (20));

    Insert into BC.

    Select rownum + 1, rownum + 1 | "" sample "

    of the double

    connect by level < = 10

    declare

    l_statement varchar2 (2000);

    Boolean bool;

    Start

    bool: = true;

    If it is true, then

    l_statement: =' select * ab ';

    on the other

    l_statement: =' select * from bc';

    end if

    I'm in execute immediate l_statement - something like that, but I don't know

    loop

    dbms_output.put_line (i.a);

    end loop;

    end;

    Something like that, but this isn't a peace of the code work.

    Try this and adapt according to your needs:

    declare

    l_statement varchar2 (2000);

    c SYS_REFCURSOR;

    l_a number;

    l_b varchar2 (20);

    Boolean bool;

    Start

    bool: = true;

    If it is true, then

    l_statement: = "select a, b, AB;

    on the other

    l_statement: = "select a, b from bc;

    end if;

    --

    Open c for l_statement;

    --

    loop

    extract the c in l_a, l_b;

    When the output c % notfound;

    dbms_output.put_line (l_a |') -' || l_b);

    end loop;

    close c;

    end;

    /

  • loop through the layers defining the lock and visibility

    I need to loop through the layers in the active document and the value of the properties of the layer is false or true.  I tried to create a loop using a method 'for', but it doesn't seem to work. I have renounced the method 'for' because I kept running into a problem.  I have set all layers with these settings just the odd ones (2,4,6, etc.). Here is sample if it was written.

    myLayer = myDoc.layers var [2];

    myLayer.visible = false;

    myLayer.locked = true;

    myLayer = myDoc.layers var [4];

    myLayer.visible = false;

    myLayer.locked = true;

    myLayer = myDoc.layers var [6];

    myLayer.visible = false;

    myLayer.locked = true;

    myLayer = myDoc.layers var [8];

    myLayer.visible = false;

    myLayer.locked = true;

    I have 208 layers, so doing it this way would be way to long. Any help would be appreciated.

    Illustrator CC 2014 running.

    After I wrote this and tested, I saw that Carlos had already answered, but I thought that I would post it anyway. Carlos KNOWS how much I love JS... ;-)

    One difference is that, since it was not clear to me which layer you talk like layer #1, I started at the bottom of the scale.  I hope this helps.  -TT

    var aDoc = app.activeDocument;
    var lc = aDoc.layers.length;
    for (var i = 2; i <= lc; i+=2) {
        var curLayer = lc - i
        aDoc.layers[curLayer].visible = false;
        aDoc.layers[curLayer].locked = true;
    }
    
  • ÖAF - loop through a vo and get values of attribute associated with line

    HI people,

    I need code of the OPS to loop through a VO and retrieve the values of attribute associated with each line.

    I use following code in AM after - vo.invokeMethod ("initQuery", params, classes) - line.

    for (loop = 0 int; loop < vo.getRowCount (); loop ++) {}

    Line resultRow = vo.getCurrentRow ();

    If (resultRow! = null)

    System.out.println ("" + (String) resultRow.GetAttribute ("PARTYID"));

    }

    -resultRow - is done with the null value.

    Please share the code to achieve this.

    Thank you

    NGO

    You must call vo.next () to move to the next row, but this isn't a good method.

    You can browse the lines of the vo in two aspects.

    First one uses an iterator that is more reliable because it does not change the current line. You must create the java vo RowImpl file to do this.

    int fetchRowCount = vo.getFetchRowCount();
    voRowImpl row = null;
    if (fetchRowCount  > 0) {
        RowSetIterator iter = vo.createRowSetIterator("Iter");
            iter.setRangeStart(0);
            iter.setRangeSize(fetchBidderRowCount);
            for (int i = 0; i < fetchBidderRowCount; i++) {
                row = voRowImpl iter.getRowAtRangeIndex(i);
                 //use RowImpl getters
                 Number personId = row.getPersonId();
        }
        iter.closeRowSetIterator();
    }
    

    Second, one is your method proper form:

    for (Row row = rowsVo.first(); row != null; row = rowsVo.next()) {
         Number personId = (Number)row.getAttribute("PersonId");
    }
    

    Kind regards

    Anil.

  • Loop through the list in flex 4 conclusion d buttons

    Anyone know how to completely recursively loops through the list in flex 4 by pulling the bodies of buttons.  This way I can apply my effects for buttons on the screen at the same time?

    You just create a subclass of button that has the desired effect and use it throughout your application.

    Gordon Smith

    Adobe Flex SDK team

  • loop through the list in flex 4

    I want to loop through the list and apply the following code to each button, the checkbox and the descent down in my application

    mouseOver = "animateHover ('theComponentID').

    How is that possible?

    Hello

    This should do what you want, you must add the eventlistener now your animated can be run from the th event handler.

    protected function button1_clickHandler(event:MouseEvent):void

    {

    for (var i: Number = 0; i<>

    {

    var obj:Object = this.getElementAt (i);

    If (flash.utils.getQualifiedClassName (obj) is 'spark.components::Button')

    {

    (obj as Button) .addEventListener (MouseEvent.MOUSE_OVER, onMouseOver);

    }

    If (flash.utils.getQualifiedClassName (obj) is 'spark.components::CheckBox')

    {

    (obj as CheckBox) .addEventListener (MouseEvent.MOUSE_OVER, onMouseOver);

    }

    }

    }

    private void onMouseOver(event:MouseEvent):void

    {

    animateHover (event.currentTarget);

    }

  • intermittent connection problem: 'the user profile Service service has no logon. The remote procedure call failed and did not execute. »

    Hello, I'm having intermittent problems with logging in my Windows 7 computer.

    Often after reboot due to applications of Windows Update or any simply restart after the holidays, I have the following message on trying to connect:

    "The service user profile Service has no logon. The remote procedure call failed and did not execute. "

    When I click 'OK', the machine disconnects and try to restart.  This can occur 2 to 5 times before _works_ .  But sometimes it happens at all.  And sometimes he _partially_ connects, but my "reminder" and the "Sidebar Gadgets' not loading not correctly and I get a different RPC error - for example, I lived once a message RPC over Skype cannot work because the remote procedure call failed.

    I'm fairly certain that it is different from the frequently reported issue 'profile of corruption', which was experienced by others.  This problem manifests itself as 'the user profile Service does not log. The user profile could not be loaded "and is reported as a blocking problem consistently reproducible which is set by the 'fixing' of the profile.

    However, the issue I feel is clearly related to an RPC problem is intermittent and not consistent - maybe one of my devices is not reset properly?  Where I can look in the logs of Windows, to provide relevant information on this subject?

    Because my computer was still under warranty, I have raised the issue of Dell and they removed the damaged system file (user account) last week.

    I hope that this will finally fix the problem (previously the error message disappear and reappear after a few weeks later.)  I'll give it a few more weeks to be sure.

  • The remote procedure call failed and did not execute

    whenever I put up-to-date Windows 7 freezes my new laptop and the computer ends by does not. Whenever I try to open my computer, documents, control panel and look for the following error message if poster to the remote procedure call failed and did not execute

    Hi aaabbbcccdddeeefffggg,

    Try the following steps:

    Type services in the start menu search box.

    In Services, scroll down to "Remote Procedure Call", and make sure that the status is "started."

    and set to automatic.

    The second 'RPC Locator' must be set to "manual".

    If the problem persists, as a workaround, you can perform online scan on your computer and check if the error message is caused due to malware or viruses.

    Now visit the link provided below for analysis online on your computer.
    http://OneCare.live.com/site/en-us/default.htm

    Later, try to install the updates and check.

    Aziz Nadeem - Microsoft Support

  • "search query: = services the remote procedure call failed and did not run".

    My computer crashed two days ago and I'm finally home, but whenever I try to open a window of any folder I keep refusing. In particular the main computer folder. One of the error messages I got is the following:

    search query: = services the remote procedure call failed and did not run

    Followed by this one:

    The remote procedure call failed and did not execute.

    I opened the Task Manager and tried to access the services from there, but whenever I do, the Task Manager window freezes.

    How can I fix it, my computer is so slow running and does hardly anything and guard with all freezing orders that I try.

    Hello

    This error generally, if the system is infected with Virus and malware or system files are corrupt.

    Please, try the methods below and check if the problem persists.

    SFC scanner.

    You can read the following Microsoft article to repair corrupted using SFC tool files. Use the System File Checker tool to repair missing or corrupted system files

    Reference: http://support.Microsoft.com/kb/929833/en-us

    If the problem persists, try a run Microsoft Safety Scanner.

    http://definitionupdates.Microsoft.com/download/definitionupdates/safetyscanner/amd64/msert.exe

    The Microsoft Security Scanner is a downloadable security tool for free which allows analysis at the application and helps remove viruses, spyware and other malware. It works with your current antivirus software.

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.

    Important: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

    Do try the suggestions above and let us know the results.

  • "The remote procedure call failed and did not execute." Tried many things, still does not work

    Hello, whenever I try to open a file, the message "the remote procedure call failed and did not execute" appears. I checked that "Remote Procedure Call" began and is on automatic, as well as the RPC Locator is the manual value. I also ran a full system scan of my Norton Antivirus, which picked up nothing.  Can someone please?

    Hello

    You can try to change RPC Locator auto and see if that fixes the problem?

    I recommend that you only perform a scan with the auditor of the filesystem, which will scan your system for missing/corrupted or damaged files and will try to correct them.

    How to run the System File Checker

    http://www.SevenForums.com/tutorials/1538-SFC-SCANNOW-Command-System-File-Checker.html

    Also, you can run the check disk to find bad sectors that may be present on your system.

    Check your hard drive for errors

    http://Windows.Microsoft.com/en-us/Windows-Vista/check-your-hard-disk-for-errors

    Thank you

    Legaede

  • When you try to log on, get error - "the system event notification service has no logon. the remote procedure call failed and did not execute. »

    My netbook will not open a session because it can not find a certain file. She won't tell me the file. and when I try to go to safe mode it freezes... is there anyway I can just read another account another point? the message I get is "the system event notification service does not log. the remote procedure call failed and did not execute. "tips anyone? I care is no longer the files it contains. If I could wipe it off somehow to factory settings then would be too cool. his windows 7 starter edition


    Original title: hp netbook to log issue

    You have two options:

    • Perform a factory restore. Check the homepage of the manufacturer for instructions.
    • Start the computer with your Windows XP installation CD, and then follow the prompts. You will have to find the different drivers to match your hardware, for example a driver for SATA hard drive.
  • The remote procedure call failed and did not run + user problem?

    Good so I have a Sony VAIO with Windows 7 Home Premium 64-bit, 4 GB RAM and 640 GB hard drive. During his first installation, VAIO asks you to name your computer so I called him "CARINA" and everything worked perfectly.

    However, we wanted to change the main username in the 'OSCAR', so I went to the control panel > users and this has changed. I thought that everything was great, because when I open the Start Menu, top-right, he says "OSCAR". After more research in the area of research, two things appears under the name 'CARINA': a 'user profile', I think, who had a small square color sky-blueish. and a folder with a lock on it. I tried clicking on the user 'CARINA' first profile, and it just opened what, in my view, is a Properties window 'CARINA '.

    But when I clicked on the folder "CARINA" with a lock, it opened my libraries. But get this: at the top, he said not "CARINA", but "OSCAR". I thought it was odd he did that so I told the computer to delete the folder with the lock named 'CARINA '. As soon as I realized it was a huge file and a gazillion files were there (real libraries), I canceled it, he wants to immediately restore the Recycle bin. But nothing appears on the trash, or I can't enter either because an error saying "the remote procedure call failed and did not execute".

    But the mistake has been made and now it does not work. The Start Menu appears, but I can't click on anything or use the search box. When I click on my library of records, the same message appears ("the remote procedure call failed and did not execute") or when I enter 'Open action center', he said ': {266EE0668-A00A-44D7-9371-BEB064C98683}\5\::{BB64F8A7-BEE7-4E1A-AB8D-7D8273F7FDB...» The remote procedure call failed and did not execute. " Programs on my toolbar work, such as Chrome or Windows Media, or I can change the volume with the icon in the lower right, but I can not enter in 'Computer', my libraries, or anything else. When I open the the TASK Manager, under processes, they are all under the name CARINA. If I stand on the top of the "explorer.exe" process, and I do a right-click on top of CARINA > properties > Security > there are 4 listed users:

    • SYSTEM
    • Administrators (CARINA-VAIO\Administrators)
    • Users (CARINA-VAIO\Users)
    • TrustedInstaller

    The computer has a backup (if I have a backup of an another VAIO Windows 7 Home Premium 64 - bit if necessary) and I'm afraid to stop in case it does not start again. :(

    Any help? What can I do?

    Hello

    Method 1:

    Follow the steps mentioned below.

    (a) type services in the start menu search box.

    (b) in Services, scroll down to "Remote Procedure Call", and make sure the status 'Started' and set to automatic.

    (c) the second "RPC Locator' must be set to"manual ".

    Method 2:

    I suggest you to scan SFC. Scan SFC will be scans all protected system files and replaces incorrect versions with appropriate Microsoft versions.

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7
    http://support.Microsoft.com/kb/929833

    Note:
    I suggest you check manage user accounts to check how many user accounts are present.

    a. Click Start.
    b. go to the control panel.
    c. click user accounts and family safety, and click on user accounts.

    Check how many accounts user is present.

    Method 3:
    I suggest you to create the new user account and check if the problem persists.

    Create a user account
    http://Windows.Microsoft.com/en-in/Windows7/create-a-user-account

    If everything works well in the new user account, then I suggest you to transfer data and settings to the fixed aid corrupt profile.

    Difficulty of a corrupted user profile
    http://Windows.Microsoft.com/en-in/Windows7/fix-a-corrupted-user-profile

Maybe you are looking for

  • cannot move to the toolbar records

    What happened to the ability to drag a link into the address bar in a folder on the personal bar? I can't drag a link to the folder, it seems to be blocked somehow. Please notify

  • How to put the tabs on the top?

    Hi I want tabs on top, but I don't know how (see my screenshoot) http://I57.Tinypic.com/10mst9t.PNG

  • How to display the address bar which is buried in the top of the page?

    I don't see the address bar which is buried in the top of the page. My cursor will not mount on top and will not force the page down. I tried to uninstall and reinstall without help. I can't use the site because I can't go to the address bar.What can

  • Recovering data from a Time Machine to an external drive backup

    How to recover data from a backup Time Machine to an external drive? I use Time Machine to back up data (photos, videos) on an external drive (drive A) to another external drive (drive/B) separate that I use for Time Machine backups. After performing

  • Write to measure file by default to 'save to a file.

    I am using the 'write to Measurment queue' to do a series of files - but as soon as I hit ok it is default to 'save to a file. Even without running the VI he defines simply himself back. I have attached files what it looks like before you hit OK, the