Adding records int BLOCK in a loop

Hi all

I have problems in the following ways:

When I press a button, I request a cursor that returns several records, according to certain values on this record that I have to add, or not a block.

Somoeone please tell me how to do, I do:

GO_BLOCK ('BLOCK');
FOR reg cursor
LOOP
..
..
If s = reg.value"then
create_record;
: BLOCK. VALUE = S ';
end if;
..
..
END OF LOOP
close the cursor;
Exception
while others
close the cursor;


THX in advance!

The problem that I feel is the FRM-40102.

The "FRM 40102 Records must be inserted or deleted everything first" error implies that you already have a line/record of "New" in your form so that when you call the CREATE_RECORD integrated forms you said that you have not met the minimum values required for the current 'new' recording you can not create a new.

Frm40735 suggests (good choice of name, incidentally), rather than using the Create_Record, I would recommend that you check if the line the cursor is a new record before attempting to create a new record. Your code should look like this:

GO_BLOCK('BLOCK');
  FOR reg in cursor
    LOOP
    ..
    ..
    if reg.value = 'S' then
      If (:system.record_status != 'NEW') THEN
        create_record;
      END IF;
    :BLOCK.VALUE = 'S';
    end if;
    ..
    ..
  END LOOP
  close cursor;
Exception
  when others
    close cursor;

Hope this helps,
Craig B-)

If someone useful or appropriate, please mark accordingly.

Tags: Oracle Development

Similar Questions

  • How to make a loop that records data block without having to navigate to it

    I have a form with 2 tabs. Tab_1 displays the information of the monitor and tab_2 raw_data (that the user attempts to insert/update or delete) for the monitor. The two tabs have a button 'Post production', which messages the raw_data (in tab_2) to the database. If it is an update operation, I have to check if a column_value_1 has changed from what is present in the comic book. If so, then the user should be given a warning. The warning would be appropriate if the column_value_1 for any 1 record is changed. Therefore, the comparison can be stopped after first difference. The code in the when_button_pressed trigger looks like

    go_block (raw_data());
    first record;
    loop
    If value_changed then
    v_alert: = true;
    "exit";
    end if;
    IF: SYSTEM. LAST_RECORD = "TRUE" THEN
    EXIT;
    ON THE OTHER
    NEXT_RECORD;
    END IF;
    end loop;

    If v_alert then
    display_alert;
    end if;

    This should work fine if I'm in tab_2 (which displays the block of raw_data). But if I hit the 'Post production' button tab_1, go_block (raw_data()) would go to tab_2, I do not want to make. So, how can I browse the raw_Data in tab_2 block without having to navigate to this tab?

    Prosper,

    I don't have what it is possible to loop in a block without having to navigate to it. Instead, you can navigate to the control you are calling by GO_ITEM integrated.

    Kind regards

    Manu.

  • Firefox refuses to stop the blocking of pop-up windows - up, even with added exceptions and blocker completely disabled.

    I work in a facility that uses a corporate intranet to access our database. The database uses windows pop up widely important information. Problem is that Firefox absolutely will NOT stop block popup windows no matter what I try. At first I added our database server to the list of exceptions. It worked for a while, but soon after resumption of the important pop-up blocking. I then completely disabled the blocking of popup windows (options > > content > > unchecked "block popup windows"). It did not work until I closed and reopened Firefox. A week later (today!), Firefox takes over again blocking the pop-up windows. I double checked my settings to confirm that Firefox still claims to have the popup blocker off.
    At this point, I am at a loss on how to proceed. I looked at other issues similar and my frustration (and certainly their even more), individuals requesting repeatedly told them to turn off the blocker of popups even after explaining that they already have. Help would be very appreciated.

    Thanks for the description of the Firefox Safe Mode. I just thought that Safe Mode is a condition under which we could launch Windows XP in a minimal operating system by starting a startup sequence, hold down the F8 key and effectively manage the prrams troubleshooting and maintenance for Windows. It seems that the Windows XP of Firefox version could run not affected by a virus, a worm or other malware, and ge fixed.

    Please try this Linux distribution. They are many, and I'm a fan.

  • Record event blocks LabVIEW if the event Type is not selected.

    Hi I think that found a possible bug in LV2011 SP1.

    -Thread a property node of event Reg on the dynamic event record Terminal of a structure of event

    -Add a case to the event

    -Click on the dynamic event

    -LV accidents

    The source code included, try adding the unspecified event and look like LV breaks down.

    BR,

    / Roger

    Hi Roger,

    I doubt it. If you first select the event in the node property and then add the event to the event, you do not get an accident (I don't have at least let me know if you do). However, if boring and annoying is when it happens, there is a simple solution to the problem, which probably means that it will not be fixed on the previous version.

    Johan BR

  • How to record data using a while loop?

    Hello

    I created a .vi I try to use to record several channels of data. I have implemented the user must be able to record data until the "STOP" button is pressed, then the data is saved in a spreadsheet file.

    Question No. 1: How to allow the user to store an indefinite amount of data?

    If you run the .vi as is, you will see that you are only able to collect 100 points, and registration takes place during Ms. I want to collect about 5 minutes worth of data and have a sampling frequency of 1 kHz.                 Any suggestions?

    Question 2: How can I change the worksheet file extension? Let's say I want than to save it as a .csv file?

    Thanks in advance for any pointers or suggestions!

    I have not looked at your code, but only based on your description I would implement a producer/consumer to save your data.  You must acquire your data in a loop (the producer) and send to your loop of logging (the consumer) using a queue.  Yes, you must save the data, then that is acquired.  In this way, you do not have to worry about storage who knows how much data in RAM.  It's just the disk as soon as he can.

    You can save the file with whatever the desired extension.  If you want it to be a CSV file, then do the extension a .csv.

  • Adding pages and blocks of text to emulate the behavior of "Smart Text Reflow"

    I create a large number of tables in a document.  If I'm Smart Text reflow on, my script is malfunctioning.  I have the start of treatment:

    1. Add a new table

    2. If the last block of text of page overflowing and then add a new page

    With smartTextReflow off, I want to assure that the executives of new blocks of text which corresponding to the main text of the page master.  It must be able to manage to get the settings from the page of left/right text block.

    I have solved my problem.  I was overthinking things!

    Given that I have selected blocks of text on master pages as the main text blocks, when you create a new page, a block of text is automatically created. So the problem is then simply connect the block preceding text for the text block that was created when the page is added.

    TableAutomation.prototype.AddPage = function() {
         var previousTextFrame = app.activeDocument.pages[-2].textFrames[0];
         var np = app.activeDocument.pages.add();
         var textFrame = np.textFrames[0];
         previousTextFrame.nextTextFrame = textFrame;
    };
    

    The cost of the above code was about 5 hours of banging my head against the wall

  • Adding text audio blocks

    Hello

    I use 7 Captivate to create a course for my employer. On one screen, I have a graph composed of several areas. I want the user to click on each box and see a text while also playing audio describing the contents of this box. Thanks to the wonderful this forum, I was driven to advanced Actions and have works perfectly with the text. Last week I was given audio files. I opened each tip Action, added the audio file correct and sound. When I saw the slide, audio works fine, but the text does not appear. Anyone know what I am doing wrong? I've included a screenshot of one of the advanced actions.

    AdvActions.JPG

    Text containers have a duration of only 3 seconds, so that areas of click, which trigger actions (attention: a shared action is not an advanced based on the same script action, will provide some links) have their suspension point way more later (can't see where because a calendar stops before the end of the slide). If you show text captions and the read head has already gone beyond 3 seconds, text will never be shown. It is indeed a problem of chronology, as I suspected. Extend the blocks of text at the end of the slide (CTRL-E) and try to understand why I have proposed to group them.

    But if they click while playing the slide audio, there are always two audio clips playing simultaneously.

    Take a look on: http://blog.lilybiri.com/dare-to-share-part-1 and http://blog.lilybiri.com/dare-to-share-part-2

    I still have to write the third part on reuse stocks shared in another project.

  • Record on block DB

    Hi all

    A question concerning how Oracle actually stores the recordings on disc. Let's say we have a database of 8K block, or 8192 bytes... who consider 192 bytes (just for example) are used for the header information. So we're with 8 000 bytes.

    If we have a single record take 4500bytes and then fact oracle maintains the 3500bytes remains free or it allocates the same record following their breaking of blocks...

    Please suggest...

    Thank you

    851602 wrote:

    A question concerning how Oracle actually stores the recordings on disc. Let's say we have a database of 8K block, or 8192 bytes... who consider 192 bytes (just for example) are used for the header information. So we're with 8 000 bytes.

    If we have a single record take 4500bytes and then fact oracle maintains the 3500bytes remains free or it allocates the same record following their breaking of blocks...

    It depends on the size of the incoming next record and you use freelist management or SAMS.
    Can you be more specific about the scenario that you are interested in.

    Concerning
    Jonathan Lewis

  • Adding record helps the dynamically nested table

    Hello guys im trying to add records to a nested table plsql dynamically. Here is my code that only adds a record. I can not figuered on why it's not more then add one record to the nested table. I think I would say at the table to update the index and insert the new index but I'm not sure on the index can someone throw me a BONE.
    I also tried the records, but I seem to be facing the same problem.
    create or replace
    PROCEDURE QUICKTEST AS 
    BEGIN
    /*declare and array to loop through. to write error log.*/
    declare
    TYPE local_table IS TABLE OF VARCHAR2(30);
    acct_code local_table;
    
    
    TYPE rec_type IS RECORD (       -- local RECORD type
        f1 INTEGER,
        f2 VARCHAR2(4)
      );
      r2     rec_type;                -- local type
    
    num number(17):=0;
    
    begin
    FOR Lcntr IN 1..20
    LOOP
        
        
         acct_code := local_table ('I');
         r2.f2 := num+1;
        
    num:=num+1;
    
    END LOOP;
    
    END QUICKTEST;

    I think you are looking for something in the lines of...

    CREATE OR REPLACE PROCEDURE quicktest
    AS
       TYPE local_table IS TABLE OF VARCHAR2(30);
    
       acct_code   local_table  := local_table();
    
       TYPE rec_type IS RECORD(   -- local RECORD type
          f1   INTEGER
         ,f2   VARCHAR2(4)
       );
    
       TYPE rec_type_arr IS TABLE OF rec_type
          INDEX BY BINARY_INTEGER;
    
       r2          rec_type_arr;   -- local type
       num         NUMBER(17)   := 0;
    BEGIN
       FOR lcntr IN 1 .. 20
       LOOP
          acct_code.EXTEND;
          acct_code(lcntr) := 'I' || lcntr;
          r2(lcntr).f1 := num + 1;
          r2(lcntr).f2 := 'J' || TO_CHAR(num + 1);
          num := num + 1;
       END LOOP;
    
       DBMS_OUTPUT.put_line(acct_code.COUNT);
       DBMS_OUTPUT.put_line(r2.COUNT);
    
       FOR i IN acct_code.FIRST .. acct_code.LAST
       LOOP
          DBMS_OUTPUT.put_line(acct_code(i));
       END LOOP;
    
       FOR i IN r2.FIRST .. r2.LAST
       LOOP
          DBMS_OUTPUT.put_line(r2(i).f1 || ' :: ' || r2(i).f2);
       END LOOP;
    END quicktest;
    /
    
  • How to record data block details without validation data?

    Hi all.
    I have a form - forms 6i - contains three blocks of data DB1 h1 ^(form/master) ^ <-DB2 ^ (in the form of table/main/detail) ^ <-DB3 ^(tabular/detail) ^

    There are certain mandatory elements in DB1, which must be entered.
    user first enter data DB1 then go to DB2 - master DB1, DB2 in detail.
    in normal when insert us a new record in the detail data block and move the cursor to the next element form will ask for validation. I solve this problem by engaging if the status in new or modified data block, that is the problem because there are certain elements is required in DB1, so if the user leave them empty and fill the tabular data block DB3 form will commit and the requested item will be stored as null in the database.

    so, how can I save the data in DB2 and DB3 temporally to the form so that the form won't ask for validation when the cursor will move to the other element?
    If Yes, then I can do a procedure which ensure that all the necessary filed came before committing.
    Thank you

    To be very honest, I'm still confused what you want to do. But the thing in the last post asked you then read on the POST in the help of forms...

    Integrated POST

    Writes data into the form in the database, but does not perform data validation. Oracle Forms valid first form. If there are changes to publish on the database, for each block in the form of what oracle Forms written deletions, insertions and updates the database. All the data that you send to the database is committed to the database of the next COMMIT_FORM that runs when the session Runform. In addition, these data can be restored by the next CLEAR_FORM.

    -Clément

  • How to find the sum of an element of the record multi block?

    Hello

    Hi I have form have a multi block record and sing record block. Multi block record for an element, namely Excise_value. I want to find the sum of total Excise_Value of the entire tape. How to get there.

    Please guide me in this regard.

    PS: I want to use the Formula property / summary forms

    Thank you

    Iqbal

    For your unique record block, set the property of simple recording/precalculate summaries on YES.
    And in BlockA, set the property of all the query to YES.

    -Clément

  • Play the recorded movies blocked after the computer repair

    I taped a lot of television films of storage on hard disk using Media Center. I also played to them using Media Center. My computer failed and the graphics card was replaced, following Media Center will no longer play the recorded movies, citing copyright issues. He, too, let me record new ones. What can we do?

    jmvranish@Hotmail,com

    Looks like it has something to do with Macrovision? What is a Nvidia card?

  • Movie Maker won't save, reached 1% recorded and blocks indefinitely.

    Tried on two machines. Project includes a 26 MB WMV 3minute14second (recorded a series of slides under WMV PPT in PowerPoint) and 3 MB MP3 audio file that I need to save as a single film. Tried to save as H.264 and WMV with the same results... a pop dialog box where it says "Step 1 of 1", reached 1% and will sit down again there indefinitely. Complete deadlock, it is a screenshot of how it appears: http://i.imgur.com/k0rby.jpg

    Movie Maker version 2012 (Build 16.4.3503.0728)
    Windows 7 Pro 64-bit SP1

    Hello

    Movie Maker is not included in the Windows 7 operating system.

    Reference:

    Movie Maker:

    http://Windows.Microsoft.com/en-us/Windows7/products/features/Movie-Maker

    If you use Windows Live Movie Maker, I suggest you send the same Windows Live Forums from the link below:

    http://answers.Microsoft.com/en-us/windowslive/Forum

    Otherwise provide us with more information on the issue sets to help you to fix as soon as possible.

  • Adding records

    How to add records to another table that is bound by the field used for the id of another table?

    I have two tables have been created.  the first with just the id and a field for the name of the employee. the second table contains the fields IDs, used, date and time.

    the id of the first table is related to the employee of the second table.

    Thanks for the help

    I am currently out of the office. It will work, but only if the reference to the 'Table1.Row1.employeeID' object is to your hierarchy.

    See here for info/PDF on referring to objects: http://assure.ly/kUP02y.

    Niall

  • Adding records to a collection

    Hello

    I have a collection of say, a. I executed a select... BULK COLLECT IN A... and "n" recoveries recorded in A. is it possible for me to run a SELECT... BULK COLLECT IN A and add the records in a. (I need the resulting records of the two queries in the collection).

    Thanks in advance,
    Thomas Titus

    I guess that you need at least two collections: then you would

     c2  := c1 multiset union all c2;
    

    Otherwise you must combine two queries with a union of all and bulk collect in this one...

Maybe you are looking for

  • Power connector has come loose on my Equium L300-146

    Hello Someone can tell me, how can I take my satellite phone to bits?Attachment of power supply located on the side is an absolute git to connect to, it is because the connector inside the laptop is loose and movements. There must be a way. Any info

  • Remove or replace (NOT append) data channels PDM

    Is there a way to delete the channel that has already been written to a TDMS file data? Simply write the tot data new data channels appears to add the new to the old. I don't see a way to remove OR replace the old with the new dat. Ben

  • Adding shortcuts to the installer lead to out of memory crash

    I have a collection of about 20 executables I want to consolidate to a single installer. Create destinations, by selecting the source files etc is very simple, nothing special. I wanted to add shortcuts for simple applications, but here the installer

  • Challenges of the airline?

    My wife and I are flying Southwest Airlines to Las Vegas next week. I would take my rebel T5 with me kit, but wonder if I should leave some of them original. Are there parts of my gear that won't be like TSA? Table of contents: EOS Rebel T5 body w/st

  • Recovery media creation

    Is it necessary to create media recovery (dvd) for my computer hp laptop pavilion I have these:-key original home base printed windows 7 64 bit on my laptop-file .iso base windows 7 64 bit home-installed files install all the drivers and other softwa