Form triggers the error when the table trigger fires.

Hi all!

Recently, I had to add a modification_date column to a table accessed in several forms.

In an effort to not modify these several forms, my initial effort was to add an insert/update trigger.

As you can guess, the trigger works as expected, but an error is triggered by each form to the effect that another user has made changes that require a re - interview.

Can anyone suggest an alternative method (short discount - I don't still want to send forms if possible)?

If I am forced to change the forms, SYNCHRONIZE will do?

Alternatively, do I change before insertion and prior update on each form?

Thank you!

Mike

MikeShannon wrote:
.. .my initial effort was to add a trigger for insert/updated to date...

... As you can guess, the trigger works as expected, but an error is triggered by each form to the effect that another user has made changes that require a re - interview...

What trigger you added to your table? (Before insert/update; After insert/update?)

So, the "record error updated by another user" occurs after a change has been introduced and the user attempts to edit the record again - is that correct?  From your description, it's when I 'think' you get the error.  Could clarify you?

You could just refresh your block after validation, but this would require to change your forms - which is what you were trying to avoid.  I don't think you'll be able to avoid modifing your forms.

Craig...

Tags: Oracle Development

Similar Questions

  • PL/Sql error when creating a trigger

    Hello everyone m trying to set a trigger whose goal is to not allow any update insert or remove on the work table, if the day is Sunday. I tried this code but it gives me error
     create or replace trigger No_work_on_Sunday
     After insert or update or delete
    on Work When owner='MAX'
    for each row
    begin
            if (select to_char(sysdate,'D')=1) then
                     raise_application_error(-20001,'no work on sunday');
          end if;
     end;
    
     
     on Work when owner='MAX'
             *
    ERROR at line 3:
    ORA-04077: WHEN clause cannot be used with table level triggers
    Pls help

    Published by: 781207 on July 16, 2010 07:43
    create or replace trigger No_work_on_Sunday
     After logon on DATABASE
     begin
           if to_char(sysdate,'D')=1 then
                     if ora_login_user IN ('Jake','MAX') THEN
                         RAISE_APPLICATION_ERROR(-20001,'No work on sunday');
                   end if;
          end if;
    end;
    /
    

    SY.

  • What is this error when creating a trigger

    Hello

    I have create a trigger and get the following error. What is - c

    1 CREATE OR REPLACE TRIGGER TRG_AUDIT_LOGON AFTER
    2 LOG ON TO THE DATABASE
    3 Declare
    4 v_sid v$session.sid%type;
    type of v_serial 5 v$ session.serial # %;
    v_username 6 v$session.username%type;
    v_osuserid 7 v$session.osuser%type;
    8 v_machinename v$session.machine%type.
    v_PROGRAM 9 v$session.program%type;
    v_TERMINAL 10 v$session.terminal%type;
    11 v_hostname v$instance.host_name%type;
    v_instance_name 12 v$instance.instance_name%type;
    13 v_application_id v$database.dbid%type;
    date of v_logon_time 14;
    15 v_Audit_tab_check varchar2 (30);
    16 v_system_users_tab_check varchar2 (30);
    17 v_sql_Audit_upload varchar2 (1000): = "INSERT INTO dbaoper. T_AUDIT (HOST_NAME, APPLICATION_ID, INSTANCE_NAME, SID, SERIAL #, username, OSUSERID, MACHINENAME, PROGRAM, TERMINAL, LOGON_TIME) VALUES (: v_hostname,: v_application_id,: v_instance_name,: v_sid,: v_serial,: v_username,: v_osuserid,: v_machinename,: v_program,: v_TERMINAL,: v_logon_time) ';
    18 type c_audit_cur_typ is ref cursor;
    19 C_Audit c_audit_cur_typ;
    20 V_system_users_tab: = "T_SYSTEM_USERS";
    21 No_Audit_records Exception;
    Begin 22
    23 select table_name in v_Audit_tab_check from dba_tables where owner = 'DBAOPER' and table_name = "T_AUDIT";
    24 select table_name in v_system_users_tab_check from dba_tables where owner = 'DBAOPER' and table_name = "T_SYSTEM_USERS";
    25 c_Audit open for ' SELECT sid, serial # username, osuser, machine, terminal program v $ session WHERE audsid = userenv ("' sessionid" ') and program not as "'oracle@%J0%"' and no user name (select * from dbaoper.' |) V_system_users_tab |') and type! = "' BACKGROUND"' ';
    26 c_Audit of fetch in v_sid, v_serial, v_username, v_osuserid, v_machinename, v_program, v_TERMINAL;
    27 if c_Audit % Notfound then
    28 lift No_Audit_records;
    Else 29
    30 select host_name, instance_name in v_hostname, v_instance_name from v$ instance;
    31 select dbid from v_application_id from v$ database;
    32 select sysdate in double v_logon_time;
    33 execute immediate v_sql_Audit_upload using v_hostname, v_application_id, v_instance_name, v_sid, v_serial, v_username, v_osuserid, v_machinename, v_program, v_TERMINAL, v_logon_time;
    34 end if;
    35 close C_Audit;
    exception of 36
    37 when no_data_found then
    38 dbms_system.ksdwrt (2, 'ORA-20001 Audit T_AUDIT or T_SYSTEM_USERS not found Audit information tables are not entered'
    (39);
    40 what then No_Audit_records
    41 dbms_output.put_line ('Audit number to insert records");
    42 * end;
    SQL > /.

    WARNING: Trigger created with compilation errors.

    SQL > sho err
    Errors for TRG_AUDIT_LOGON TRIGGER:

    LINE/COL ERROR
    -------- -----------------------------------------------------------------
    18/20 PLS-00103: encountered the symbol "=" when expecting one of the
    Next:
    constant exception < an ID >
    < a between double quote delimited identifiers > double Ref table Fedya
    char time timestamp interval date binary national character
    NCHAR
    The '< an identifier >' replaced with '=' to
    continue.


    Thank you
    Pramod

    replace * "' * with *" *. For example userenv ("' sessionid" ') to userenv ("sessionid")

  • Get the error when using the UTL_SMTP function in Oracle 11 g

    Hello

    I get the error when executing a trigger e-mail code in oracle 11 g:

    I have following trigger on the temporary table:

    CREATE OR REPLACE TRIGGER temp_temp_message AFTER

    INSERT OR UPDATE ON temp_message FOR EACH LINE

    declare

    Conn UTL_SMTP . CONNECTION ;

    msg VARCHAR2 (2000);

    Start

    Conn := UTL_SMTP . open_connection ( host => '10.250.1.149', port=>25 );

    UTL_SMTP . HELO ( conn, '10.250.1.149');

    UTL_SMTP . mail ( conn, '[email protected]');

    UTL_SMTP . RCPT () conn ' [email protected]');

    msg := "Hello, this is test mail." ;

    UTL_SMTP .data( conn, msg);

    UTL_SMTP . quit smoking ( conn );

    exception when others then

    dbms_output.put_line (sqlerrm);

    raise_application_error (-20000,

    "Failed to send because of the following error messages: ' " || sqlerrm);

    end;

    Insert in temp_message values ()1

    );

    When I insert the record in the table there are given the following error.

    ORA-20000: failed to send messages because of the following error: ORA-24247: access denied by access control (ACL) of network list

    ORA-06512: at the 'APPS '. TEMP_TEMP_MESSAGE', line 14

    ORA-04088: error during execution of trigger ' APPS. TEMP_TEMP_MESSAGE'

    But if I run the next plsql through sqlplus send mail successfully:

    declare

    Conn UTL_SMTP . CONNECTION ;

    MSG VARCHAR2 (2000);

    Start

    Conn := UTL_SMTP . open_connection ( host => '10.250.1.149', port=>25 );

    UTL_SMTP . HELO ( conn, '10.250.1.149');

    UTL_SMTP . mail ( conn, '[email protected]');

    UTL_SMTP . RCPT () conn ' [email protected]');

    msg := "Hello, this is test mail." ;

    UTL_SMTP .data( conn, msg);

    UTL_SMTP . quit smoking ( conn );

    exception when others then

    dbms_output.put_line (sqlerrm);

    raise_application_error (-20000,

    "Failed to send because of the following error messages: ' " || sqlerrm);

    end;

    Thanks in advance.

    Yoann

    To resolve ORA-24247 you must:

    (1) create an acl (if it is not already created)

    (2) add the user privileges using the resources of the network

    (3) to use the ACL to a specific address

    This might be useful

    How to fix an ORA-24247: access denied by access control (ACL) of network list | DB tips

  • Select the row in the table to change in a form

    Hi all

    I use Jdeveloper 12.1.3.0.0 on windows internet explore 10.

    I have the following form and the read-only table. the form and the table that are both on the same object from view.

    click_edit.png

    When the user clicks a row in the table, I want to choose this line in the form above for editing purpose.

    How would I do that? the first column of the table is a primary key.

    I followed shayjdev vedio http://www.youtube.com/watch?v=e0IcnXLJUgU

    but the problem is that when I click the button CreateInsert (5th button left in my case), never clear the form for the opening of new record, instead, he put the table in input mode.

    kindly help me with this.

    Thank you.

    To create a new line, you drag the operation createInsert of the data control on the create new"" button. This should create the new row.  If you like the new line being the last of them using the link from dvohra21 to https://blogs.oracle.com/jdevotnharvest/entry/how_to_add_new_adf

    In this case, you must change the listener to the button action to point to the generation of listener action code of Frank.

    Timo

  • How to get multiple rows in the table is displayed on the form

    I am looking for a way to get more table rows that appear on the form.  I created a table with a header and a line with the add-in and remove button option.  I like how the sample purchase order form has it setup in the designer it shows one line and it appears on the form so the table has three rows to start with.  How do I do that?  I looked at the code on the sample and I couldn't find it anywhere.  Please help, thanks.

    Hello

    I have an example here in the construction of a dynamic array markets.

    http://www.assuredynamics.com/index.php/category/portfolio/building-dynamic-tables/

    You must select the line and then go to object > Binding palette and set it to repeat. You can set the minimum and initial number to what you want.

    The form should be saved in a dynamic form of XML in the Save as dialog box.

    Also the page must be set to Flowed, so that as the table grows, push another object down. In addition, you need to configure the paging settings so that the flow of the page as the number of lines is superior to a single page.

    Give a start and if you need more help,

    Niall

    Ensure the dynamics

  • ExportCollectionAction causes the current values of lines to be copied into the first row of the table

    Greetings experts,

    I use JDev 11.1.2.3

    I am faced with a really strange behavior of the exportCollectionActionListener. I have a table for each row in this table, a link that calls a popUp. This popUp tells the story of this selected save changes (means it displays data from a different table/VO, who keeps a history of the first) in a table. I have a button that calls the exportCollection for this second table. When I press on it, an excel file is generated and downloaded and everything is perfect until now. If there was not any which record in this table, and o back to the first, by pressing the button send is not track all changes. But if there where all records from this table of history (always talking about the history of the current line), go back to the first and press on submit, that the very first line of the table of fir trees, gets all of it's values as the last row of the second table, as it is copied from one to the other. I have to press on restore back to normal (note that the popUp has it's CancelListener to call a restore of a bean to support operation).

    Why is this happening?

    Thanks in advance

    I found a work around for this problem.

    I added the code that causes the whole view Refresh (ie: the whole page), the popUp cancelListener, also I changed the commandLink partialSubmit property and set it to true. It's not like totally cool watching the screen charge for this fragment of a second after the closure of the pop-up window, but it not the drill.

  • ORA-04079: specification of the invalid trigger

    CREATE OR REPLACE TRIGGER CARE. SURCHRG_UPDT
    AFTER INSERTION
    ON CARE. CHARGE_TRANS_DETAILS
    REFERRING AGAIN AS NINE OLD AND OLD
    FOR EACH LINE
    If (SELECT pad_adm_no FROM patient_adm WHERE pad_cur_pat_type = 'CRD' AND pad_cur_bill_cls IN ('SPN', 'RSH') pad_org_cd AND NOT IN ('OM6")))
    BEGIN
    UPDATE charge_trans_details
    SET ctd_surcharge_percent = 10,
    ctd_spon_surcharge_amt = ctd_item_pat_spnr_amt * 10 / 100
    WHERE <>'P1' and ctd_cancel_flag = n ctd_grp_cd
    END;

    I am facing above error when creating this trigger.

    Help...!

    Sorry, try this
    CREATE OR REPLACE TRIGGER CARE. SURCHRG_UPDT
    AFTER INSERTION
    ON CARE. CHARGE_TRANS_DETAILS
    REFERRING AGAIN AS NINE OLD AND OLD
    declare
    Temp of VARCHAR2 (10);
    BEGIN
    SELECT pad_adm_no
    IN temp
    OF patient_adm
    WHERE pad_cur_pat_type = 'CRD '.
    AND pad_cur_bill_cls IN ('SPN', 'RSH')
    AND pad_org_cd NOT IN ('OM6");
    Temp of IF IS NOT NULL
    THEN
    UPDATE charge_trans_details
    SET ctd_surcharge_percent = 10,
    ctd_spon_surcharge_amt = ctd_item_pat_spnr_amt * 10 / 100
    WHERE ctd_grp_cd = 'P1' AND ctd_cancel_flag = ' not *; *
    END IF;
    END;

    Published by: human Chen on May 26, 2012 15:50

    Published by: human Chen on May 26, 2012 15:50

  • Solution for the mutation of table of error when using triggers

    Hello

    Could you please give the solution for the error table mutation during the use of triggers. I'll give you the simple scenario here,

    I created a trigger on the employees table, whenever all DML operations takes place in the employees table, it must run the trigger body. I intentionally used also of the employees in the body of the trigger table. Please give me the solution.

    Triggering factor:

    create or replace trigger test_trigger

    before you insert or update or delete employees

    for each line

    declare

    an employees.first_name%type;

    Start

    Select first_name from people where job_id = "AD_PRES";

    end;

    DML statement:

    Update employees set salary = 20000 where job_id = "AD_PRES" (I run this query)

    Error message:

    ORA-04091: table HR. Is the transfer of EMPLOYEES, the function of triggering/can not see

    ORA-06512: at "HR. TEST_TRIGGER', line 4

    ORA-04088: error during execution of trigger ' HR. TEST_TRIGGER'

    Can anyone tell, in what other scenarios, we get this error or recursive table mutation?

    Thanks in advance

    Hello

    When you create a trigger on a table, you cannot edit/query this table the trigger is not completed.

    You can use

    (1) transaction of Pragma autonomous

    (2) instead of row-level trigger, you have statement-level trigger

    (3) to 11 g, try with COMPOSITE trigger

    Try below to avoid it (a solution):

    create or replace trigger test_trigger

    before you insert or update or delete employees

    for each line

    declare

    PRAGMA AUTONOMOUS_TRANSACTION;

    an employees.first_name%type;

    Start

    Select first_name from people where job_id = "AD_PRES";

    COMMIT;

    end;

  • Error in SQL syntax when inserting data to the table in the form of values using insert record

    Hello

    I was hoping that someone could help me.  I am creating a form of registration on a website to insert data into a database table.  When you try to create the form, I get the following error:


    You have an error in your SQL syntax; consult the manual for your version of the MySQL server for the right syntax to use near ' VALUES (name, regno, reason) leave (has ', 1, 'dddd')' at line 1

    I checked the syntax, but you don't know what's wrong.

    I am running Windows 7 with Dw cs6 and wamp server.

    Leave with the names of column (name, regno, reason) is the name of the table.

    Thank you for your help and please help me.

    The code is as below:

    <? php require_once('Connections/connect.php');? >

    <? PHP

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION < 6) {}

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

    }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    Switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    $editFormAction = $_SERVER ['PHP_SELF'];

    If (isset {}

    $editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);

    }

    If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "form1")) {}

    $insertSQL = sprintf ("INSERT INTO leave (name, regno, reason) VALUES (%s, %s, %s)',

    GetSQLValueString ($_POST ['name'], "text").

    GetSQLValueString ($_POST ['reg'], "int").

    GetSQLValueString ($_POST ['reason'], "text"));

    @mysql_select_db ($database_connect, $connect);

    $Result1 = mysql_query ($insertSQL, $connect) or die (mysql_error ());

    }

    ? >

    < ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > ""

    " < html xmlns =" http://www.w3.org/1999/xhtml ">

    < head >

    < meta http-equiv = "content-type" content = text/html"; charset = utf-8 "/ >"

    < title > online form let < /title >

    < name meta = "keywords" content = "" / > "

    < name meta = "description" content = "" / > "

    < link href = "styless.css" rel = "stylesheet" type = "text/css" media = "screen" / > "

    < / head >

    < body >

    < div id = 'wrapper' >

    < div id = "header" >

    < div id = 'menu' >

    < ul >

    < class li = "current_page_item" > < a href = "#" > home < /a > < /li >

    < li > < /li >

    < li > < /li >

    < li > < a href = "#" > on < /a > < /li >

    < li > < /li >

    < li > < a href = "#" > Contact < /a > < /li >

    < /ul >

    < / div >

    <!-end #menu->

    < div id = "Search" >

    < / div >

    <!-end #search->

    < / div >

    <!-end #header->

    < div id = "logo" >

    E - SCHOOL of CHRIST < h1 > < / h1 >

    < p > < / p >

    < / div >

    < hr / >

    <!-end #logo->

    <! - end #header - wrapper->

    < div id = "page" >

    < div id = "content" >

    < div class = "post" >

    < h2 class = "title" > leave application online < / h2 >

    < div class = "entry" > < / div >

    < / div >

    < do action = "<?" PHP echo $editFormAction;? ">" method = "POST" name = "form1" id = "form1" >

    < table width = "200" border = "2" cellspacing = "5" cellpadding = "5" >

    < b >

    < scope th 'row' = > name < /th >

    < td > < label for = "name" > < / label >

    < input type = "text" name = "name" id = "name" / > < table >

    < /tr >

    < b >

    < scope = "row" th > Reg No. < /th >

    < td > < label for = "reg" > < / label >

    < input type = "text" name = "reg" id = "reg" / > < table >

    < /tr >

    < b >

    < scope = "row" th > why < /th >

    < td > < label for = "reason" > < / label >

    < name textarea = 'reason' id = cols 'reason' = "45" rows = "5" > < / textarea > < table >

    < /tr >

    < b >

    < scope = "row" th > < /th >

    < td > < input type = "submit" name = "b1" id = "b1" value = "Submit" / > < table >

    < /tr >

    < /table >

    < input type = "hidden" name = "MM_insert" value = "form1" / >

    < / make >

    < / div >

    <!-end #content->

    < div id = "sidebar" >

    < ul >

    < li >

    Notice of < h2 > < / h2 >

    < p > students must present the appropriate documents supporting the reason for leave within 3 working days. < /p >

    < /li >

    < li id = "calendar" >

    Calendar < h2 > < / h2 >

    < div id = "calendar_wrap" >

    < table summary = "Calendar" >

    < caption >

    March 2014

    < / legend >

    < thead >

    < b >

    < th abbr = "Monday" scope = "col" title = "Monday" > M < /th >

    < th abbr = "Tuesday" scope = "col" title = "Tuesday" > T < /th >

    < th abbr = "Wednesday" scope = "col" title = "Wednesday" > W < /th >

    < th abbr = "Thursday" scope = "col" title = 'Thursday' > T < /th >

    < th abbr = "Friday" scope = "col" title = 'Friday' > F < /th >

    < th abbr = "Saturday" scope = "col" title = 'Saturday' > S < /th >

    < th abbr = "Sunday" scope = "col" title = 'Sunday' > S < /th >

    < /tr >

    < / thead >

    < tfoot >

    < b >

    < td abbr = "February" colspan = "3" id = "prev" > < a href = "#" title = "" > & laquo; Feb < /a > < table >

    < class td = "pad" > < table >

    < td abbr = "April" colspan = "3" id = "next" > < a href = "#" title = "" > Apr & raquo; < /a > < table >

    < /tr >

    < / tfoot >

    < tbody >

    < b >

    < td colspan = "5" class = "pad" > < table >

    < td > < table > 1

    < td > < table > 2

    < /tr >

    < b >

    < td > 3 < table >

    < td > < table > 4

    < td > 5 < table >

    < td > < table > 6

    < td > < table > 7

    < td > < table > 8

    < td > < table > 9

    < /tr >

    < b >

    < td > < table > 10

    < td id = 'today' > < table > 11

    < td > < table > 12

    < td > < table > 13

    < td > < table > 14

    < td > < table > 15

    < td > < table > 16

    < /tr >

    < b >

    < td > < table > 17

    < td > < table > 18

    < td > < table > 19

    < td > < table > 20

    < td > < table > 21

    < td > < table > 22

    < td > < table > 23

    < /tr >

    < b >

    < td > < table > 24

    < td > < table > 25

    < td > < table > 26

    < td > < table > 27

    < td > < table > 28

    < td > < table > 29

    < td > < table > 30

    < /tr >

    < b >

    < td > < table > 31

    < class td = "pad" colspan = "6" > < table >

    < /tr >

    < / tbody >

    < /table >

    < / div >

    < /li >

    < li > < /li >

    < /ul >

    < / div >

    <!-end #sidebar->

    < div style = "" clear: both; "> < / div >"

    < / div >

    <!-end #page->

    < div id = "footer" >

    < p > Copyright (c) University of Christ. All rights reserved. < /p >

    < / div >

    <!-end #footer->

    < / div >

    < div align = center > < / div > < / body >

    < / html >

    The LEAVE is a reserved word in MySQL. You can try to quote, but you are better to rename it.

  • DB trigger error - update even table in the script of the trigger

    Hi all
    I have a table tab1, whenever any update is done on this table on column col1 and col2 also needs to get the update. (These are related to user forms can be updated only col1 form frontend)
    So I created a trigger as follows.
    ----------------
    CREATE OR REPLACE TRIGGER tri1
    AFTER UPDATE
    ON tab1
    FOR EACH LINE
    WHERE (NEW.col1 = 'YES')
    DECLARE
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    Tab1 SET col2 = 1 UPDATE
    WHERE transaction_id =: OLD.transaction_id;
    COMMIT;
    END;
    --------
    When there is no update on this table, I get following error. Please let me know if I'm missing something.
    ORA-00060: Deadlock detected while you wait resource
    ORA-06512: at "user1.tab1", line 5
    ORA-04088: error during execution of trigger 'user1.tab1 '.
    Please let me know if I'm not clear. Thank you

    Published by: DharV on August 23, 2011 05:17

    Your transaction_id is unique?

    If this is the case, then you could perhaps use AFTER UPDATE BEFORE UPDATE:

    CREATE OR REPLACE TRIGGER tri1
    BEFORE UPDATE
    ON tab1
    FOR EACH ROW
    WHEN (NEW.col1 = 'YES')
    BEGIN
       :NEW.col2 := 1;
    END;
    

    If your transaction_id is not unique - if you really want to update more than one line in tab1 - your update cannot update the same line that the trigger has responded, even with the use of an autonomous transaction. Then you could combine the BEFORE UPDATE trigger above with your own AFTER UPDATE, but then add ROWID! =: OLD. ROWID to where clause, but it would be a bad idea because some of your lines will be updated in a single transaction and others in another transaction.

    In general the autonomous transaction is not a great way to solve the problem of changing table within a trigger. I hope that you have a unique transaction_id and can do BEFORE the UPDATE - if it is then a better way is to save the update id in an overall picture in FOR EACH ROW triggers, and only then AFTER an UPDATE fire is NOT "for each line" update the list of saved IDs

  • ERROR / T_ITEMS in the TABLE is changing, function of triggering/can not see ORA-06512... ?

    Hi all

    I CREATED THE TRIGGER TO CHECK NOM_ELEMENT BEFORE UPDATE ON THE T_ITEMS TABLE IF AN ANOTHER NOM_ELEMENT LIKE NOM_ELEMENT CURRENT OR NOT, IF AS AN ANOTHER NOM_ELEMENT DON'T SAVE UPDATED CURRENT NOM_ELEMENT.

    MY NO IS:

    1 - I CREATED the FUNCTION CALL CH_UNIQUE_ITEM_NAME

    CREATE OR REPLACE FUNCTION CH_UNIQUE_ITEM_NAME
    (NUMBER OF P_ID, P_ITEM_NAME IN VARCHAR2)
    RETURN NUMBER
    AS
    NUMBER OF X_COUNT;
    -FUNCTION "CH_UNIQUE_ITEM_NAME" TO CHECK NOM_ELEMENT LIKE OTHER NOM_ELEMENT OR NOT.
    BEGIN
    SELECT COUNT (ITEM_NAME)
    IN X_COUNT
    OF T_ITEMS
    WHERE ID! P_ID =
    AND UPPER (ITEM_NAME) AS UPPER (P_ITEM_NAME);
    RETURN X_COUNT;
    END CH_UNIQUE_ITEM_NAME;

    2. I CREATED TRIGGER CALL TRG_CH_UNIQUE_T_ITEMS

    CREATE OR REPLACE 'TRG_CH_UNIQUE_T_ITEMS' before FIRING
    UPDATE
    ON T_ITEMS FOR EACH LINE
    DECLARE
    NUMBER OF X_CHECK;
    BEGIN
    SELECT CH_UNIQUE_ITEM_NAME (: OLD.ID,: NEW.) NOM_ELEMENT) IN DOUBLE X_CHECK;
    IF (: NEW.) NOM_ELEMENT DISLIKES: OLD. Nom_element AND X_CHECK > 0)
    THEN RAISE_APPLICATION_ERROR (-20007, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    END IF;
    END;

    NOW WHEN I UPDATE ANY ITEMS FOUND ERROR "ERROR / T_ITEMS in the TABLE is changing, function of triggering/can not see ORA-06512.

    Form on T_ITEMS22222.png

    Please help me TO RESOLVE THIS ERROR. I TIRED TO SOLVE...

    Thank you

    You don't realize that you have just set a UNIQUE INDEX of several columns?

    create unique index index_name_uq on table_name( user#, upper(item_name) );
    

    In addition, a GUI Design point, (using the terms of the APEX) that you want to validate the data before submit you.

    (use a Page-level Validation)

    MK

  • When I filled a form field using a query SQL result is displayed but not registered in the table.

    I write in the topic, I have created a form and in some of their fields, I used a SQL query to get information from a table based on the user who has been logging.

    The information displayed well, but when I press "Send button" loses information and the field in the table is shown empty.


    Anyone know what is happening?

    I enclose below a picture of the problem

    Concerning

    Problema DB APEX.jpg

    Hi ANTHONY,.

    ANTHONY wrote:

    I give you the credentials of my database, I hope you could do it works and most importantly, showing me what the error care...

    Feel free to change what you want in the application

    https://Apex.Oracle.com/pls/Apex/f?p=4550:1:2838412118981:

    BANCO_PRUEBAS

    ADMIN

    password

    It is interesting that, when I use APEX 5.0.1.00.06, I have some errors form appearing not using APEX 4.1.0.00.32

    Check your 77569 application-> Page 1. I have modified the page element attributes. Now it's working.

    Here are the changes (I will explain for P1_NOMBRE, did the same for the P1_APELLIDOS and P1_CATEGORIA):

    • 'Source' has become article attributed to him include:

    Source: Replacement always, value that exists in session state

    Source type: column database

    Source of value or an expression: NUMBER

    • The "Default" article now the following attributes:

    By default of Type: PL/SQL function body

    Default value:

    DECLARE
    
      L_NOMBRE B_LISTA_EMPLEADOS.NOMBRE%TYPE;
    
    BEGIN
    
      select NOMBRE
      into   L_NOMBRE
      from   B_LISTA_EMPLEADOS
      where  USERNAME = :APP_USER;
    
      RETURN L_NOMBRE;
    
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
      RETURN NULL;
    
    END;
    

    Kind regards

    Kiran

  • Errors when you create, modify, delete the upgrade userand user form

    Hello

    I get the error while trying to do operations on the user form... what they indicate. any suggestion would be appreciated.

    When tried to change the user to change the user organization, received this error. (changing other attributes works very well)

    Orchestration process moved to the step failed, and the corresponding error is - {0} []

    oracle.iam.platform.kernel.EventFailedException: an error occurred during execution of the core event handler.

    When I tried to upgrade user IOM form, received this error

    Inner exception: java.sql.SQLException: ORA-01691: impossible to extend lob IAMEXT_OIM segment. SYS_LOB0000354182C00002$ $ by 128 in tablespace IAMEXT_OIM

    When I tried to create a user received this error

    Process orchestration with the id 498509, failed with the IAM-3051103 error message: failed to create operation on the entity user at the stage of the action... [[

    oracle.iam.ui.platform.exception.OIMRuntimeException: IAM-2050243: process of Orchestration with the id 498509, failed with the IAM-3051103 error message: failed to create operation on the entity user at the stage of the action...

    Thank you

    This is related to your database and size.  Please contact your DBA with the error so they can expand the table.  You can always find the ORA code too: ORA-01691 impossible to extend LOB segment

    -Kevin

  • What trigger to use to insert data into the table db forms

    Hello

    My form is current having a block of database with the table reference. When you enter data into the form field and click Save. Automatically record is inserted in the database table.
    I want to do this under manual insert. I changed the block of data to a data non-base. Where should I write the insert statement to insert data into the table.
    Is - shutter release key of the form-level validation?

    Please notify.

    Thank you
    Didi.

    You can guide me how to remove the message FRM-40401 no changes to save and instead, I wanted to put 1 transaction record successful... some like it like that.

    Hi didi.
    And this is my last post I'll sleep. ;)
    Take form level trigger named preform
    and write on it

    :SYSTEM.MESSAGE_LEVEL := 5;
    

    I hope this works...

    Hamid

    Mark correct/good to help others to get the right answers. *

Maybe you are looking for

  • How can I change my name on my email out to icloud?

    When I try to send an email via icloud, it comes up with my ex wives name then my icloud address? I would change it please!

  • Gray lines through the pictures

    Hello I recently downloaded the photos from my iphone, and on them the Photos app preview, they showed with gray lines in the Center with a mini-apercu of the photo.  This happened only in the first installment of 100 or more, and the rest of the pho

  • Extremely slow during extraction of CD to iTunes

    I think that there is something wrong with my drive. I bought my desktop on Black Friday, opened last week and it seemed extremely fast; I absolutely loved. But yesterday, I decided to add my new CD to iTunes (whether it is Christmas and all) and I n

  • Is the computer must be turned on to do disk defrag?

    COMPUTER NEED TO BE ON FOR DISC DEFRAG WORK

  • Defraging system no

    I have a laptop of 3060SA DV. When I defragment I rest again the section disk system with 13% who will not defrag' is this normal? Best regards Richard