Operate on a Tabular Data Block as a table?

hi
i was wondering if it is possible to query a tabular displayed data block like is done with tables. and do updates and inserts. so just to be clear, i dont want to query/insert/update the database table but the values in the form display items. i'm using oracle forms 9i
the main reason im asking this is because i want to use vaules in different records in the tabular displayed data block to make validations in the same data block... before the form is commited of course
thanks
venom_zx

You cannot query or manipulate blocks like table.
But you can manually navigate to each record in the block and validate before they are commited to the base table.

Similar Messages

  • How to disable any record in a Tabular Data Block

    Hi,
    I have a tabular data block having 10 records, every record has a check box(1 check box on each row). I want to disable all items in that particular record where user checks the check box(check box is UNCHECKED by default).
    Is this possible in WHEN-CHECK-BOX-CHANGED trigger or any other trigger ?, if so, how, please help.
    I hope that, I have illustrated the problem clearly.
    Regards.

    Hi,
    You cannot disable a single row in detail block. Instead You can set the UPDATE_ALLOWED property to FALSE. By this the user can't change the contents.
    IF :<block_name>.<check_box_name> = '<value_when_checked>' THEN
       SET_ITEM_INSTANCE_PROPERTY('<block_name>.<item_name>', CURRENT_RECORD, UPDATE_ALLOWED, PROPERTY_FALSE);
    ELSE
       SET_ITEM_INSTANCE_PROPERTY('<block_name>.<item_name>', CURRENT_RECORD, UPDATE_ALLOWED, PROPERTY_TRUE);
    END IF;Regards,
    Manu.
    If my response or the response of another was helpful or Correct, please mark it accordingly

  • Performing operation on tabular data block

    hello guys,
    i m designing one tabular data block in orcle 6i form builder form emploee_master table form maintaing the employee personnel details.
    i have to perform some operation on this data block like viewing existing records,updatinng the record(s),deleting a purticular record,insrting new record.
    is there a shortcut way to perform theses operations so processing shoulg be fast and data shold be updated?
    pl tell me and give some demo form to understand these operations if possible.
    With Regards
    Vishal agrawal

    Hello,
    All you have to do is to create a block based on the database table. Forms will, then, do everything for you (insert, update, delete) at commit time.
    Francois

  • Tabular data block

    I have a tabular data block (records with a scrollbar). I want to add another field (a checkbox) outside the block so that when clicked, it would change the state of all the activated records within the block (also checkbox's). I tried to get the number of existing records, but I failed and didn't understand the posts on this forum.
    Thanks in advance

    Is this a question regarding Oracle Forms? If so, you probably want to ask the question in the Forms. Make sure that you specify what version of Forms you're using if you do post the question over there.
    If this is a question regarding a GUI developed in some other programming language, you probably want to find the appropriate language/ framework/ development environment forum here on OTN to ask the question.
    Justin

  • Testing status of a tabular data block

    When displaying a tabular data block, how can I tell if the user entered data into a blank row, so I know if I can issue a "create_record;" or not.
    Thanks

    Hello,
    Entering a new row fires the When-Create-Record trigger.
    Francois

  • Problem In Tabular Data Block

    Hi,
    I have to two blocks on a form (1) CONTROL----------------------------------------->CONTROL BLOCK
    (2) DETAIL-------------------------------------------->DATA BLOCK
    DETAIL BLOCK has four items referencing DETAIL TABLE COLUMNS namely ROWNUMBER, ITEMNAME, QTY, PRICE.
    In BLOCK(1) I have three text items to get input from user, and a push button . In this block(1) user inputs ITEMNAME,QTY & PRICE and presses push button.
    In WHEN-BUTTON-PRESS trigger I wrote below mentioned code
    BEGIN
    go_block('detail');
    first_record;
    for a in 1..:control.QTY loop
    create_record;
    :global.rownumber:=:global.rownumber+1; // this :GLOBAL.rownumber variable, I declared & initialized with zero, in WHEN-NEW-FORM-INSTANCE trigger.
    :detail.rownumber :=:global.rownumber;
    :detail.itemname :=:control.itemname;
    :detail.qty :=1;
    :detail.price :=:control.price;
    end loop;
    END;
    If usesr enters QTY 4,,,,, four rows are being created in detail block as four records , if user enters QTY 3, three rows are being created, and so on as per number entered in QTY text item........THE PROBLEM IS THAT, ROWS(RECORDS) ARE CREATING BUT FIRST ROW IN DETAIL BLOCK REMAINS EMPTY AND IT STARTS CREATING RECORDS FROM 2ND ROW.
    An help please.
    Regards,

    Hello,
    Well, if you think that the code you wrote with global variable its working for you then for the problem you mentioned the below code should work.
    BEGIN
    go_block('detail');
    first_record;
    clear_block;
    for a in 1..:control.QTY loop
    :global.rownumber:=:global.rownumber+1;
    :detail.rownumber :=:global.rownumber;
    -- :detail.rownumber :=:SYSTEM.TRIGGER_RECORD; -- this line should work also. So, no need for global variable
    :detail.itemname :=:control.itemname;
    :detail.qty :=1;
    :detail.price :=:control.price;
    create_record;
    end loop;
    END;-Ammad

  • How to reduce the number of data blocks used by table

    Hi,
    I was trying to reduce the space usage of a particular table of my apex application which stores blob content and therefore deleted many records from it.
    However, the data block usage remained the same as before.
    I have tried to 'analyze' the table and validate the structure,but am unable to overcome this problem.
    Could someone throw some light on what needs to be to reduce the number of data blocks used by this table?
    Best Regards,
    Priya Jetley

    Priya:
    It is likely that the BLOB content defined in your table is being stored 'Out-of-Line'. This means that the LOB columns are stored in segments of their own. These then are the segments that may need shrinking.
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14249/adlob_tables.htm#i1006363
    Varad

  • ORA-01578: ORACLE data block corrupted on tables in sysaux tablespace

    Dear Experts,
    From the alert log file we noticed data block corruptions on one of our datafiles. After further investigation, we realized that the corruptions were on 3 of the AWR related tables in the SYSAUX tablespace:
    1. WRH$_LIBRARYCACHE
    2. WRH$_TEMPSTATXS
    3. WRI$_ALERT_OUTSTANDING
    The bad news is that we may not have a valid rman backup to do the recovery due to the retention policy - RECOVERY WINDOW OF 2 DAYS. Since this is a development database with limited monitoring, we did not discover the corruption until 6 days later. The issue happened about 6 days ago (about Christmas time).
    So, what are our recovery options? Can someone advice? We are thinking about drop and recreate the 3 affected v$WR* tables, but not quite sure about the impact to the system if we drop and recreate the 3 objects. Did someone experience this type of recovery. If you did, what are your approaches?
    We are running oracle 10.2.0.3 version.
    I greatly appreciate your input and suggestion. Thanks!!!

    as long as you have a backup of ur database before christmas, you can use the " MAXDAYS " cmd to get ur backup working so long as you have not used delete obsolote....had a same sistuation....where i had a backup and trying to restore it ...kept saying no valid backup...after going thru some stuff...found the MAXDAYS cmd to use my backup...here is an example ...
    $ rman target /
    Recovery Manager: Release 10.2.0.2.0 - Production on Sun Apr 6 09:05:44 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database (not started)
    RMAN> SET DBID=1528894801
    executing command: SET DBID
    RMAN> startup force nomount;
    startup failed: ORA-01078: failure in processing system parameters
    LRM-00109: could not open parameter file '/u01/app/oracle/product/10.2.0/db_1/dbs/initsameera.ora'
    starting Oracle instance without parameter file for retrival of spfile
    Oracle instance started
    Total System Global Area 159383552 bytes
    Fixed Size 1259672 bytes
    Variable Size 58722152 bytes
    Database Buffers 92274688 bytes
    Redo Buffers 7127040 bytes
    RMAN> set controlfile autobackup format for device type disk to '/u99/backup/sameera/control_spfile_%F';
    executing command: SET CONTROLFILE AUTOBACKUP FORMAT
    using target database control file instead of recovery catalog
    RMAN> run
    2> {
    3> allocate channel p1 type disk;
    4> restore spfile to pfile '/u01/app/oracle/product/10.2.0/db_1/dbs/initsameera.ora' from autobackup;
    5> shutdown abort;
    6> }
    allocated channel: p1
    channel p1: sid=36 devtype=DISK
    Starting restore at 06-APR-08
    channel p1: looking for autobackup on day: 20080406
    channel p1: looking for autobackup on day: 20080405
    channel p1: looking for autobackup on day: 20080404
    channel p1: looking for autobackup on day: 20080403
    channel p1: looking for autobackup on day: 20080402
    channel p1: looking for autobackup on day: 20080401
    channel p1: looking for autobackup on day: 20080331
    channel p1: no autobackup in 7 days found
    released channel: p1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 04/06/2008 09:09:09
    RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
    Solution:
    RMAN> shutdown abort;
    RMAN> EXIT;
    $ ps -ef |grep pmon
    oracle 2891 2856 0 09:05 pts/1 00:00:00 grep pmon
    oracle 7448 1 0 Apr05 ? 00:00:00 ora_pmon_primary
    $export ORACLE_SID=sameera
    $ rman target /
    Recovery Manager: Release 10.2.0.2.0 - Production on Sun Apr 6 09:05:44 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database (not started)
    RMAN> SET DBID=1528894801
    executing command: SET DBID
    RMAN> startup force nomount;
    startup failed: ORA-01078: failure in processing system parameters
    LRM-00109: could not open parameter file '/u01/app/oracle/product/10.2.0/db_1/db s/initsameera.ora'
    starting Oracle instance without parameter file for retrival of spfile
    Oracle instance started
    Total System Global Area 159383552 bytes
    Fixed Size 1259672 bytes
    Variable Size 58722152 bytes
    Database Buffers 92274688 bytes
    Redo Buffers 7127040 bytes
    RMAN> set controlfile autobackup format for device type disk to '/u99/backup/sameera/control_spfile_%F';
    executing command: SET CONTROLFILE AUTOBACKUP FORMAT
    using target database control file instead of recovery catalog
    RMAN> run
    2> {
    3> allocate channel p1 type disk;
    4> restore spfile to pfile '/u01/app/oracle/product/10.2.0/db_1/dbs/initsameera.ora' from autobackup maxdays 15;
    5> shutdown abort;
    6> }
    released channel: ORA_DISK_1
    allocated channel: p1
    channel p1: sid=36 devtype=DISK
    Starting restore at 06-APR-08
    channel p1: looking for autobackup on day: 20080406
    channel p1: looking for autobackup on day: 20080405
    channel p1: looking for autobackup on day: 20080404
    channel p1: looking for autobackup on day: 20080403
    channel p1: looking for autobackup on day: 20080402
    channel p1: looking for autobackup on day: 20080401
    channel p1: looking for autobackup on day: 20080331
    channel p1: looking for autobackup on day: 20080330
    channel p1: looking for autobackup on day: 20080329
    channel p1: looking for autobackup on day: 20080328
    channel p1: looking for autobackup on day: 20080327
    channel p1: looking for autobackup on day: 20080326
    channel p1: looking for autobackup on day: 20080325
    channel p1: looking for autobackup on day: 20080324
    channel p1: looking for autobackup on day: 20080323
    channel p1: autobackup found: /u99/backup/sameera/control_spfile_c-1528894801-20080323-00
    channel p1: SPFILE restore from autobackup complete
    Finished restore at 06-APR-08
    Oracle instance shut down
    Check to make sure if initsameera.ora exists in $ORACLE_HOME/dbs location.
    $ cd $ORACLE_HOME/dbs
    $ ls -ltr
    total 7052
    -rw-r----- 1 oracle oinstall 2560 Apr 5 13:21 spfileprimary.ora
    -rw-r----- 1 oracle oinstall 7061504 Apr 5 13:23 snapcf_primary.f
    -rw-rw---- 1 oracle oinstall 1544 Apr 5 18:42 hc_sameera.dat
    -rw-r--r-- 1 oracle oinstall 1087 Apr 6 09:12 initsameera.ora
    $ pwd
    /u01/app/oracle/product/10.2.0/db_1/dbs
    $

  • Creating "Control Combo Box " Relation with data block

    Hi all dears
    i am switching from C# to oracle developer for joining gulf net software house, i have a problem regarding master detail data
    the senerio is
    "List items" control Filled programatically as under shortly:-
    rg_id := create_group_from_query('myrg', 'select dname a, dname b from dept');
    populate_group(rg_id);
    populate_list('mylist', rg_id);
    using this i fill my combo box during new form instance trigger
    i have created a datablock emp through wizard which can show 10 record.
    now
    Problem 1
    i want to show records on form when user select any dept from combo box.
    Problem 2
    if i create group from query and in select statement is like this "select dname, dpetno from dept" the record group is created successfully but i am unable to populate_list due to different data type colums in record group how i will populate list so that List items Labels are department name and value is department no
    Thanks in advance for persual

    Hi dears all
    I have solved this problem my self
    1. select dept name form combo box and the data block shows the emp's of concern depat
    solution
    create a data block of emp table through wizard
    create its table view and show 10 records
    go to datablock i consider its name "emp" datablock properties
    in Where clause condition specify deptno = : my_combo_box;
    now go to combo box when item changed event
    go_bolck("emp);
    execute_query;

  • Question: Are there any advantages for stored procedure for data block?

    There are two ways to create data block:
    1. query table or view or
    2. stored procedure.
    After 9i, AS has a PL/SQL compiler. Do we still see the advantage of using stored procedure, as claimed that it is faster due to the stored procedure always compiled?
    Thank you in advance.
    Jimmy

    Jimmy,
    The "fast" side is not the only one benefit of stored procedures.
    Of course, you can use the BULK COLLECT functionality which is not available into Forms.
    But stored procedure is a good way to perform the following actions:
    complex handeling of datas (insert, update or delete that generate severals actions on other tables).
    externalization/centralisation of business rules.(separate the design and functionnal work).
    more secutity, because you can prohibit manipulation of datas outside of the procedures.
    You can change the rules without modify the forms.
    etc.
    Francois

  • Data block field

    Hello,
    i've created a data block on a table, using the wizard. that table contains some foreign keys, let's say (class_id). i wanna, on the form, not to show the id, i wanna show the name of the id corresponding to that id
    so i have the tables:
    A
    name
    surname
    class_id references B(id)
    B
    id
    denumire varchar2(30)
    so when i create the data block on the table A, on class_id it's showing the id. i wanna show the "denumire" field, but i don't know hot
    Regards,

    Two possibilities:
    1.
    Create an additional textitem in your datablock, name it, lets say DSP_DENUMIRE set length and datatype according to the column in your table b, and (most important) set "database Item" to "No"
    Now, create a POST-QUERY-trigger on your block to fill that field:
    DECLARE
      CURSOR crLookup IS
        SELECT DENUMIRE
          FROM B
         WHERE ID=:BLOCK.CLASS_ID;
    BEGIN
      OPEN crLookup;
      FETCh crLookup INTO :BLOCK.DSP_DENUMIRE;
      CLOSE crLookup;
    END;2. Create a view in the database which does the join and then base your block on the view.
    Edited by: Andreas Weiden on 16.03.2009 19:14

  • COMMIT_FORM  per one DATA BLOCK at a time

    Hi,
    Please guide for the following:
    I have 3 data blocks (tabular) on 3 tables, with three radio buttons on the form. I want to insert records in a table as per the radio button value:
    For example
    (1) if user has selected rdbtn1 then COMMIT_FORM must insert record in table 1 only.
    (2) if user has selected rdbtn2 then COMMIT_FORM must insert record in table 2 only.
    (2) if user has selected rdbtn3 then COMMIT_FORM must insert record in table 3 only.
    Is it possible with COMMIT_FORM, if so, how, please guide.
    Regards.

    Here is the fundamental problem. The Commit_Form built-in will save all pending transactions in the entire Forms session. Therefore, in order to save incrementally (one block out of many) you have to use autonomous transactions. In essence you have to create a new session, perform your changes and save the changes outside of the current Forms session. This is typically done using Dynamic SQL. However, you can’t use the EXECUTE_IMMEDIATE Native Dynamic SQL (NDS) command in Forms. You could use FORMS_DDL (which allows you to execute dynamic SQL from Forms) but Forms_DDL issues an implicit COMM IT which will COMMI T the entire Forms Session. Therefore, the best way to accomplish this would be to call a database procedure that uses NDS to perform the needed DML and issue the COMM IT.
    The other alternative would be to do what I think "user8937305" is suggesting; depending on the Radio Button selected, you clear the other two data blocks so only the data in the selected data block (radio button) is saved through the FORMS_C OMMIT.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Data Source Data Block (REPORT) property. What for?

    Hi,
    I've seen this property in the report object, but I've never seen it used anywhere.
    It lets you chose one of your blocks, but I have no idea what use is this and online help doesn't help, as it goes with this description:
    For report/form integration, specifies the data block to be used as the source of the report as either Null or a block name.
    What is this for?

    Thanks, but, could you elaborate a bit?
    Supose I've got an emp tabular form. Then I have a report with this feature. What do I "see" from the report side?

  • Data block's table layout complicate command button?

    Why after I create a data block's layout using table format,
    when I try to insert a command button into the canvas, the
    button always appear like a concatenated buttons (i.e. if I have
    5 rows in the tabular format for displaying the data block, my
    command button becomes 5 buttons glued side by side together)?
    Advice, anyone?

    Hello Andy,
    See, when you are attaching a command button to the data block
    you created to show 5 rows, its definitely going to show you 5
    buttons in a stack manner.
    There are two ways to show one button.
    1> You should create a control block (non base table) in the
    form and attach the button there. Rows displayed property of
    this block should be 1.
    2> Open the property palette of the button in the data block.
    Change the value of "No. of Items displayed property" to 1.
    Hope this will solve your problem.
    Wishes,
    Anindya

  • Why my scroll bar of a data block doesn't work?

    Hi,
    I have a data block that displays a maximum of 9 records at one time. When the query returns more than 9 records i want to use a vertical scroll bar to navigate to the last records.
    In some forms it works fine but in others not , i still didn't find why ??
    Cheers,
    Nuno

    Nuno,
    Rather than trying to find a needle in a hay stack, I would recommend taking a step backward.  This will help to rule out whether the issue is something you caused or if there is an issue with the environment or product.
    Create a new module in the Builder.  Do not add any of your own code.
    In the Builder, connect to a database (File > Connect).
    From the Builder menu, select Tools > Data Block Wizard
    In the Wizard first screen (after Welcome), select Table or View then click Next
    On the next screen, click on Browse to display the tables available to you.  Choose one.
    All the columns in that table should appear on the left.  Click on the double arrow (>>) to select all of them.  Then click on Next
    Click on Next again
    Choose the option to create the data block then open the Layout Wizard.  Then click Finish
    In the Layout Wizard, click on Next (after the Welcome scree) to choose the default Canvas.  Then click on Next
    Click on the double arrow (>>) to choose all columns. Then click Next
    Click Next again.
    Choose Tabular as the layout style.  Click on Next
    Change Records Displayed to 4 and check the box labeled "Display scroll bar".
    Click on Finish
    Again, do not make any changes to anything in this form.  Run it.  Does it reproduce the same problem you experience in your previous form?  If this form works correctly, likely the issue is in the design of your other form.  If this test form fails in the same manner then you are either exposing a defect or there is an odd configuration issue.

Maybe you are looking for

  • How to export Android sms to pc

    I want to be able to export my Android SMS database to my pc in a friendly txt, html or pdf format that is easy to read. I have the sms.db file ready to use, i just want to be able to easily convert it. What applications that are completely free can

  • Flash Builder 4 Installation Problems

    I'm having trouble using Flash Builder 4. I first tried to use it as a plugin for eclipse, which didn't work, as I got an error when trying to open .mxml files. The error is the same one discussed in another discussion: a null pointer exception. I tr

  • Have a problem on my IMac that a screen has come up titled text edit  and can not get rid of it using OSX I believe  10.7.5

    Can not exit text edit screen when i click on the apple does not give me the option of shuting down or restart just can't get rid of it. have no clue what brought this screen up never seen it before.

  • Manual check

    hello ssap gurus,                        i am suffering with manual payment( check) tcode:FCH5 the error message is Document AML1 2011 100002 is not a payment document Message no. FS565 Diagnosis The entered payment document was not recognized as suc

  • Looking for LabVIEW part time job ,Beijing China

    Seeks the LabVIEW part time job ,Beijing China  The following is the simple introduction,I hoped it can help you to understand me. I had worked for more than 5 years in the China Aerospace Science & Industry Corp. I was engaged in research and develo