Update and delete a record

Hi all
I have a requirement in oracle forms 6i

I have a block of data that is in a table
There are 5 columns
1 column is only display and 4 others are normal text fields where we can insert update and delete these records
My requirement is when a user updates a record that should trigger an alert and the alert should ask if the user wants to update that particular record
The user presses Yes, then the record should be updated if the record should show as it has been shown previously
Similarly in case of delete an alert should fire where we have to ask confirmation if the user presses Yes, then the record must be deleted from the database
otherwise the registration should be visible on the form again as we
my 3rd requirement which is also
I have an element field which is the normal text and only display field is the description
When you enter a new record when I enter in the item field and press tab or navigate outside the scope of the element, then the description of the element must be pouplated in the decsription read only field

Please help me in the above 3 cases
I'm new to forms
I use an ID of friends that has a lot of messages

Thanks in advance

1)
your first requirement I'd prior block UPDATE trigger:

DECLARE
    v_alert_button NUMBER;
BEGIN
    v_alert_button := SHOW_ALERT('your_alert'); -- "Do you want to update?"
    IF v_alert_button = ALERT_BUTTON1 -- assuming "No"
    THEN
        -- reset value:
        :YOUR_BLOCK.YOUR_ITEM1 := GET_ITEM_PROPERTY('YOUR_BLOCK.YOUR_ITEM1', DATABASE_VALUE);
        -- optionally set item to valid if you don't want validations to fire:
        SET_ITEM_PROPERTY('YOUR_BLOCK.YOUR_ITEM1', ITEM_IS_VALID, PROPERTY_TRUE);
        -- do this for every item:
        :YOUR_BLOCK.YOUR_ITEM2 := GET_ITEM_PROPERTY('YOUR_BLOCK.YOUR_ITEM2', DATABASE_VALUE);
        ...
        ...
        -- finally reset record status:
        SET_RECORD_STATUS(:SYSTEM.CURSOR_RECORD, STATUS, QUERY_STATUS);
        -- interrupt PRE-UPATE trigger:
        RAISE FORM_TRIGGER_FAILURE;
    END IF;
END;

(not tested, please try for yourself)

2)
trigger the alert first remove the trigger.

3)
You can do within the WHEN-VALIDATE-ITEM trigger or a list-of-value (LOV) that returns the values of description.

Tags: Oracle Development

Similar Questions

  • Creation of update and delete triggers

    Hello

    I want to create 'update' and 'delete' a table 'T1_shadow' triggers that

    capture record during delete and Update Table 'T1 '.

    Kindly help

    You can use this:

    If the UPDATE can

    INSERT INTO T1_SHADOW

    values

    ('UPDATE',: old.customer_id,: old.customer_name,: old.city, sysdate, fnd_global.user_id);

    elsif DELETION then

    INSERT INTO T1_SHADOW

    values

    (' DELETE',:old.customer_id,: old.customer_name,: old.city, sysdate, fnd_global.user_id ");

    end if;

    end;

  • Update and Delete

    Oracle Version = Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production

    Hi gurus

    I have the following data samples:

    Examples of data

    As with a reference

    (

    SELECT class_id 100, to_date (May 1, 2008 ',' MON-DD-YYYY') eff_dt, to_date (May 1, 2008 ',' MON-DD-YYYY') ter_dt, amt 35000 FROM DUAL

    Union of all the

    SELECT class_id 100, to_date (May 1, 2008 ',' MON-DD-YYYY') eff_dt, to_date (July 31, 2008 ',' MON-DD-YYYY') ter_dt, 35000 FROM DUAL

    Union of all the

    SELECT class_id 100, to_date (August 1, 2008 ',' MON-DD-YYYY') eff_dt, to_date (March 31, 2012 ',' MON-DD-YYYY') ter_dt, 35000 FROM DUAL

    UNION ALL

    SELECT class_id 200, to_date (May 1, 2008 ',' MON-DD-YYYY') eff_dt, to_date (April 30, 2011 ',' MON-DD-YYYY "") ter_dt, 60000 FROM DUAL

    Union of all the

    SELECT class_id 200, to_date (May 1, 2008 ',' MON-DD-YYYY') eff_dt, to_date (March 31, 2012 ',' MON-DD-YYYY "") ter_dt, 60000 FROM DUAL

    Union of all the

    SELECT class_id 200, to_date (May 1, 2011 ',' MON-DD-YYYY "") eff_dt, to_date (March 31, 2012 ',' MON-DD-YYYY') ter_dt, 60000 FROM DUAL

    )

    SELECT * REFERENCE

    ;

    Examples of data result

    CLASS_ID, EFF_DT, TN TER_DT

    100 05/08/01 05/08/01 35000

    100 05/08/01 07/08/31 35000

    100 08/08/01 03/12/31 35000

    200 05/08/01 04/11/30 60000

    200 05/08/01 03/12/31 60000

    200 05/11/01 03/12/31 60000

    I have these data in the reference table, and I want the following data in the reference table.

    Information in the reference table

    CLASS_ID, EFF_DT, TN TER_DT

    100 05/08/01 03/12/31 35000

    200 05/08/01 03/12/31 60000

    Means system take min and max due against each set grouping in class then delete the remaining records and keep the only trace of min and max...

    I tried to use Merge and perform the update and delete, but no luck... Thanks in advance

    Concerning

    Shu

    Hello

    Here's a way to use the MERGE:

    MERGE INTO dst reference

    WITH THE HELP OF)

    SELECT MAX (ter_dt) OVER (PARTITION BY class_id) AS ter_dt

    AVG (amt) over (PARTITION BY class_id) AS amt

    ROW_NUMBER () OVER (PARTITION BY class_id

    ORDER BY eff_dt

    )                          AS r_num

    ,       ROWID                                         AS r_id

    REFERENCE

    )              src

    ON (summer time. ROWID = src.r_id)

    WHEN MATCHED THEN UPDATE

    SET dst.ter_dt = src.ter_dt

    dst.amt = src.amt,

    DELETE WHERE src.r_num > 1

    ;

    If amt will always be the same for any given class_id, so it does not belong to the same table.  If it is really always the same, then you can add amt to clause ORDER BY of ROW_NUMBER analytic and remove the other references to it.

  • Update or delete all records

    Hello world!

    Im making a site with PHP and wonder if I can do this:

    First: Let's say the db has 30 records in a table, and I want to change a particular data in all records. How can I do this?

    Second: In the same how can way, I delete all the records in this table?

    For example:

    table 'example '.

    collar ID, title, content, description

    If I want to ' reset "(changer sa valeur à zéro, par exemple) 'description' value in all records in the table, how can I do this?".

    And the second: How can I truncate the whole table? (TRUNCATE = empty all the data inside the table, right?)

    All this PHP, phpmyadmin lol no!

    Thanks in advance

    See you soon!

    As I said in the previous answer: use the UPDATE and DELETE MySQL commands. Look at em room for examples. There are a lot of examples out there that will do what you want. Basic examples are:

    UPDATE table_name SET column_name = something, column_name_2 = sometingelse

    or

    DELETE FROM tbl_name where field = something.

  • my computer updated and delete all my files, how to bring them back?

    original title: help! my computer updated and delete all my files, how to bring them back?

    Help!  My computer did an automatic update and deleted all my files and I can't find one of my old files, how to bring them back?

    You get an error message on a Temp profile?

    Try this:

    Restore point:

    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-system-restore/

    Do Safe Mode system restore, if it is impossible to do in Normal Mode.

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    http://www.windowsvistauserguide.com/system_restore.htm

    Read the above for a very good graph shows how backward more than 5 days in the System Restore Points by checking the correct box.

    See you soon.

    Mick Murphy - Microsoft partner

  • approximate number of inserts, updates and deletions

    Hello
    in 10 g with STATISTICS_LEVEL = TYPICAL
    How to see the approximate number of inserts, updates, and deletes for a specific table?

    Thank you.

    This table has been abandoned - but segment still exists – and 'strange' name comes from the management of the recyclebin.

    Nicolas.

  • Error when updating or deleting a record

    Hi all...

    I created àtable with 2 fields Group_id and GroupName group_master
    the user determines a groupname in a text box and press save. Before committing a number of seq will be generated
    inside the form of procedure and it will be inserted.

    The insert works fine.

    But when I select a record that's to say a groupname and edit this content and commit, he is not committing.

    When I checked the error display he showed Ora-01400 cannot insert null values into the table.

    IAM not not inserting a value here iam update group name only.

    even when I delete a record, it shows same error...

    can someone help with this problem...

    Thanks in advance...

    How to put

    clear_block (no_commit) or clear_block (no_validate) after go_block ('group_master');

  • Silent update and delete applications

    Hi all

    I was wondering if it is possible for a BlackBerry app to be able to update or delete itself, without, if possible, give error/caution messages. It is possible to do in J2Me using special extensions of specific suppliers, but not in generic j2me. In this case, the j2me application makes a call to some native API, asking to update/delete itself and then out of himself to the native operating system to take the necessary steps. Such a solution, or something similar, is available for the BlackBerry applications? In versions of the OS?

    Thank you

    Basilio J V Souza

    An application cannot update itself, but you can programmatically change an another third-party application.

    Install and update applications programmatically

    http://supportforums.BlackBerry.com/T5/Java-development/programmatically-install-and-upgrade-Applica...

  • Update without waiting in the update and delete command.

    Dear all,

    My database is GR 11, 2 on Linux.

    What is the best way to resolve the line lock if 2 different sessions commands delete records from the same table?

    Can we use to update without waiting in the Update or Delete command?

    Thank you
    Imran

    What you can do too, is that you can perform the update that you did for the update with select... see the following topics

    declare
    cursor c1 is
    Select * from EMP
    where deptno = 20
    Update;
    Start
    for c1_rec looping c1
    Update emp
    Set sal = 11
    the location being c1;
    end loop;
    end;
    /

    Concerning
    Karan

  • & lt;mx:RemoteObject.../ & gt; and deleting a record

    I use a RemoteObject to a CFC call that works pretty well right now. I am able to add, edit and delete records. An improvement I have to do, is if I try to remove a record that I should not be able to delete because of relational integrity issues, I.e. remove a record that is linked to another record in another table, I need to display a message to the user them teling registration can not be deleted.

    If I try to delete a record in the database will not let me delete I get a generic error message will freak out at my end users. Because of this I put the code in the CFC that prevents the CFC to try to delete a record, it should not. Problem is if the user attempts to delete a folder which cannot be deleted how can I return something (a window), back of my CFC telling them that impossible to delete the record at the moment?

    Right now the code which calls the RemoteObject looks like this (he uses a custom event to pass in variables).

    private void secTypeAddedHandler(event:SecTypeAddEvent):void / / it's the listener for the event of type dry new Add.
    {
    getAllSecStuff.addSecRole (event.secTypeToAdd); Pass the event with the addSecRole method of CFC variables.
    getAllSecStuff.getSecRoles (); Refresh data
    }

    <!--appeal WebService-->
    < mx:RemoteObject id = "getAllSecStuff" destination = "ColdFusion" source = "ISIF. WebServices.Flex.SecRoles"showBusyCursor ="true">
    < name mx:method = "getSecRoles" result = "getSecRolesHandler (event)" / >
    < / mx:RemoteObject >


    My CFC looks a bit like this:
    < name cffunction = "addSecRole" = "remote access" returntype = "string" >
    < name cfargument = "sectype" type = "struct" required = "yes" >
    < CFSET MyReturnString = "" > "".
    < CFIF STUFFTO Add... >
    < CFQUERY... to add data >
    < CFELSE MOD STUFF >
    < CFQUERY... change data >
    < CFELSE >
    < CFIF to know if I can remove it or not >
    < CFQUERY DEL DATA >
    < CFELSE >
    < CFSET MyReturnString = "No can do" > ".
    < / CFIF >
    < / CFIF >

    < cfreturn MyReturnString >
    < / cffunction >

    I guess my big question is I know that the CFC returns a string variable. How can I tell Flex to look at this value? If the returned string is set to "No can do" then I want to display a popup window indicating to the user that they cannot delete this record because it is associated with another record. If the returned string is set on "" I don't want to do anything.

    Thanks in advance for the help!

    Have an ordinary day...
    KomputerMan ~ |  :-)


    In fact I'm getting return a string in add it / mod / delete function. The only reason why I do the getSecRolesHandler
    call is to refresh my datagrid to show what changes have been made.

    I guess what I'm looking for, it's how to see what is returned by the getAllSecStuff.addSecRole (event.secTypeToAdd); call. Does show that I'm pretty new to Actionscript 3?

    So after a bit more digging, I found that I had to add a result call my RemoteObject call. So now my code looks like this:

    Then I created a function as follows, and life was good!
    [Bindable]
    private var MyUpDateResults:String = new String();

    private void getSecRoleEventStatus(event:ResultEvent):void
    {
    MyUpDateResults = event.result as String
    If (MyUpDateResults is "ClassTmp")
    {
    Alert.Show ("cannot remove the security role because it is associated with a model CF.", "can't delete the folder '");
    }
    }

    Thanks for the help, you put me on the path to enlightenment!

    Have an ordinary day...
    KomputerMan ~ |  :-)

  • Firefox updated and deleted all my favorites. How to make a comeback?

    The bookmarks menu is the same, but all have disappeared. Firefox has created another folder on my desktop, but it's all in the code, and I have no idea what is there or how to get back on this version.

    Did you reset Firefox and create a new profile and don't have created Firefox and "Old data Firefox" folder on the desktop with the contents of the old profile?

    If your bookmarks would not allow the new profile then check if there are backups JSON (.json or files compressed .jsonlz4) in the folder bookmarkbackups.

    You should perhaps delete the places.sqlite file and restore a JSON backup in bookmarks (library) Manager.

    More information about resetting Firefox.

  • My computer has been updated and deleted firefox. Can I recover my favorites?

    I updated my computer to the original terms, but documents etc. were kept. Firefox has been removed. I reinstalled it in beta. Can I recover my favorites thanks to sync? If I try to connect to synchronize I just get a blank page. I am running windows 8.1 on a Sony vaio SVF15n2b4e.

    So I double-cliquiez this one first to display the contents of the folder. There should be a few files of dozens of parameters, and a subfolder named BookmarkBackups.

    You will find many files including the date and the number of bookmarks that are incorporated in the name of the file in the subfolder BookmarkBackups. I suggest you copy these to a more convenient location, such as your Documents folder.

    Then, from Firefox, use the restore function. Note that this will replace any bookmarks you have added since you have reinstalled this new Firefox. If those who criticize, you can do the steps 'optional '.

    (1) optional - export all new bookmarks you added. See: Firefox bookmarks export to a HTML file for backup or transfer bookmarks.

    (2) restoration of the backup that you copied into your Documents folder (in the recovery menu, at the bottom, choose a file): restoration of the bookmarks from a backup or move them to another computer

    (3) If you have created an HTML file in step 1, re - import only: import bookmarks to an HTML file.

    (4) If you have imported a file in step 3, you can move the Bookmarks imported to the desired location using the dialog library (Ctrl + Shift + b).

    A little luck?

  • Help! My Windows 7 updated and deleted from my product key

    Last night my previously genuine Windows 7 update, this morning, it prompted me to enter my product key code.  Of course, I don't know where this piece of paper is gone.  I tried to go back to a previous one except point (and uninstallation of the update).  But always required the key code.  Help!  I'm not ready to move to Windows 10 again.

    When you upgrade, what will happen is that (your PC) hardware will get a digital right, a unique signature of the computer which is stored on the Microsoft Activation servers. Genuine Windows 7 Professional license will be exchanged with a key to the diagnosis.

    Whenever you need to reinstall Windows 10 on this machine, go just to reinstall Windows 10. It automatically reactivates.

    Give it a few days and it will activate automatically.

    How to find your product key after the upgrade to Windows 10

    If you have problems with activation, contact support for chat:

    Activate your Windows 10 license with Microsoft Chat support

  • Distribute the update and delete private

    Is this possible with DPS to have a privately distributed application or not through the app store, but the application can always be automatically updated wireless?

    Is it possible to remove an application remotely, in case a device is lost or stolen?

    We create an app for our Organization and wonder if the DPS (edition) will allow us to manage our applications as follows...

    You will need a license of Adobe and Apple's business to distribute privately. There is no way I know to remove an application remotely.

    Bob

  • Need help with the update server behaviors and deleting records

    I am 'trying' to use the update and delete record server behaviors and I can't get the redirection page to set up correctly. What I'm trying to do, is to have the redirection came up with the right records depending on the CompId page. It seems that it is taking the CompId and agreementId (which are my unique ID) and use them in the url of the redirection page. Also, it updates the table. Here is the url that appears after I have send the update:

    http://localhost:8888/dotweb/maintenance/agreement_home.php?CompId= & agreementId = 7

    Here is the code for the update page:

    Name of the document
    Signed?
    First name
    Family name
    Date of signature

    Pending patent, trade mark, Tradesecret and straightened to copy recorded
    Copyright KML designs 2009

    Can someone tell me why it would show the CompId and agreementId when everything I asked the CompId? Thanks for your help. Just in case, I enclose you an html version of this file. It must be a php file, but is not one of the allowed file types.

    CompId is not filled in the URL because you try to use the result of the rsAgree recordset object until the result of the recordset is created. However, you pass the CompId value via array $_POST as a hidden field.

    Change this line (52):

    $updateGoTo = "agreement_home.php?CompId=" . $row_rsAgree['CompId'] . "";
    

    to do this:

    $updateGoTo = "agreement_home.php?CompId=" . $_POST['CompId'];
    

Maybe you are looking for