Forms :: Oracle Unable To Update Record - Unique Key Violation Error
May 10, 2011
I have the search screen in my form so after searching if i select the row by using the button it will navigate the first tab page that is "gas" screen here if i tried to change the value like update and save the form it is not allowing me to update the value raising the error message "oracle unable to insert the record". if i see the "display error" in menu it is having the select statement with error "unique key violation error ora-00001".
1.display_item (primary key) 2-list_item (foreign key) / / dynamic list :this is the cause of the error 3-lis_item (foreign key) / / dynamic list 4-text_item 5-button (insert commit)
when I click the button, an error is displayed:
FRM-40508: ORACLE error: unable to INSERT record.in detail: ora-02291 integrity constraint Violated - parent key not found
Note:
-the elements of two lists already exist in the parent table!!
I have modified an existing form which is from 4 tables. I altered one of the table to suit my requirement and have compiled the form . It is compiled with out any errors. But when i enter any data it shows an error "frm-40509 --Unable to update record" and does not gets saved.
starting full resync of recovery catalog RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of backup command at 08/22/2011 22:19:07 RMAN-03014: implicit resync of recovery catalog failed RMAN-03009: failure of full resync command on default channel at 08/22/2011 22:19:07 ORA-00001: unique constraint (ODBA.DF_U2) violated
Searching metalink, its related to bug 6014994 and the proposed workaround is to delete the constraint:
Cause: Dropping a datafile from a tablespace followed immediately by adding another datafile to the same tablespace will cause this Unique Key violation. Taking a RMAN debug trace will show the file# related to the error This is reported as bug <<6014994>> Unpublished on Metalink and fixed in 11g RMAN RESYNC catalog signals DF_U2 violated constraint when a file# is reused in the same tablespace Solution WORKAROUND: Drop df_u2 constraint
where can I delete the constraint, is it possible to do in RMAN or in the target instance?
Physically DB1 .... DBN connected sequentially, so I want to prevent segmentation if some DB is unaccessible, but at the same time fight unneeded redundancy which uses too much link bandwidth to send N-1 LCR-s to all members of a single N-way group (so I want to split one big N-way zone into smaller ones and sequentially connect them into chain - it significantly reduces load on link if N is big enough (>10)). Also I want to have 2 DB in intersection zone to prevent single point of failure.
This scheme has one drawback - if change originated on DB3 or DB4, then it will be propagated (more correctly - applied and captured again) to DB5 and DB6 by both DB1 and DB2 (and, as far as I know, I have no means in capture rules to detect state of DB2 from DB1 and vise versa), so on DB5 and DB6 I get:
but it seems that it does not handle uniqueness conflicts. What is the best way to handle uniqueness conflict (is there a better way than to write custom error handler) and how serious is the impact on insert performance of having unique constraint and corresponding error handler. (In real world I will have to deal with tables with metainformation and without any keys).
Also, how to proceed with no error or raise exception from apply error handler with error that caused this handler to run? In oracle docs I can find only example that modifies LCR and runs lcr.EXECUTE(TRUE), but what to do if I don't want to reexecute LCR, but merely check error code and propagate error if it is not ORA-00001?
TAB1 with data no name 1 abc 2 abc 3 xyz 4 xyz 5 cvb
now I would like to create a form with name counts as
abc 2 xyz 2 cvb 1
I would like to create a datablock to display all the unique names, not sure where I should be writing the query to display unique names. I would like to create a textitem box to display the counts when the form is compiled, but not sure which trigger to use to write the query.
I have a multi-record block with several text items.
On one of the text items i want to enter a value and then check whether the same value for the item has already been entered on any other records within the block.
If it has already been entered then i want to display a message and null out the field.
I have tried using app_record.for_All_records from a when-validat-item trigger but this does not work as you get a 'FRM-40737 Illegal restricted procedure go_block in when-validate-item trigger ' error
We have recently shifted our database from 10G to 11G and after the intial hickups most of the thinghs have stablised. We had changed system by Alter System command so that database does not have case sensevity problem and with that all the reports from the forams have also stabilied However some of the forms are failing with the above error ORACLE ERROR Unable to read list of values
These form are running fine with users having DBA privelege. However other users this is failing.
We have also checked that with users not having DBA privelege we are able to read the data in the table within the form also. The query in the record group is very simple
"SELECT CODE,SHORTDESC FROM GENCODES WHERE CODETYPE='BS' AND CODE <> '00'"
All these forms were fine previously when database was on 10g.
Moreover there are many other fields where list of values are there and allthose are ruing fine.
I have also checked datatype and length in query as well as fields on the form
In my application I am facing peculiar error. For easy understanding I am considering emp table. In my package P1 I have two procedures Proc1,Proc2.
Proc1 : It is receiving employee details and for checking if employee already exists it is calling Proc2. Proc2 : Here it checks if employee exists. If exists it deletes old record, commit and inserts new record in sequence.
But however in few instances Proc2 is returning unique constraint (CONSTRAINT_NAME) violated. I am very much confused why this error is coming.
What i have to do to overcome the following error..whenever im using toad im getting this error since start writing and executing procedures and functions.
access violation at address 006b5b1b in module 'toad.exe' read of address 0000011d
Using apex 4.2. I have created form item on page and item attribute DISABLES IN SETTINGS , set value as YES and SESSION STATE value as YES.
SETTINGS->DISABLES-> SESSION STATE
by doing this i am getting the error. Error is
Session state protection violation: This may be caused by manual alteration of protected page item P98_CHECK_AMOUNT. If you are unsure what caused this error, please contact the application administrator for assistance.
when i tried to delete the record by clicking the delete button which has the trigger code as
delete from emp where employee_id=:e_id; commit;
it wasn't. and showed the message as ---FRM-40508: ORACLE ERROR: Unable to INSERT record.
if i change the EMP ID item property "database item" to "NO"..then i can able to delete the record..but, now i am unable to insert the record form the same form...
I want to update record when i press the button "update" but i don't have idea ,if i will create a new forms ,or new block or the update is made in the same form.
I developed one form having 3 blocks(query_find,Summary and detail). If i do some changes in the 3rd block then press F4 key it's prompting "Do u want to save the Changes?[YES/NO/CANCEL].
If i press "YES" it displays message "1 Records applied and Saved. But the record is not saved in the database.
I have this error. To put it simply I have two blocks.
Block1 contains two drop down list with PL/SQL statements for queries. Block2 contains tabular form created from block wizard (I tried already in manual)
that will catch the result in Block1 queries.
Now I have a button with a trigger when-button-pressed that contains
BEGIN INSERT INTO dummy1 VALUES ('hello',1,2,3); COMMIT; END;
My goal is to add into dummy1 values from :block2.item_name1, :block2.item_name2, :block2.item_name3 but to put it simply I tried these values but I received the same error.
When I run it and first things first click the button, the values will be added into dummy1 table but when I execute the block1 - dropdown list queries and try to press the button. I received the error.
I got this error: frm-41051: You can not update this record
While i searched about this error on net,
I did everything..my block property is yes for INSERT_ALLOWED and UPDATE_ALLOWED.
By programatically I didn't set property false for that block.i check each and every item property for that block...its also yes for INSERT_ALLOWED and update_allowed..
I don't want the users to be able to update a record where the date reported field has a date.I have used the set_block_property(blk_id, update_ allowed, property_false). But it still prompts me if I do change something and I try to exit the form.
How can I stop the "Do you want to save changes you have made" box from showing?
I have one requirement.i.e I want to display 'Do you want to save the changes you have made?[YES/NO]' message when record status is changed.In my form if i enter some value to the actual qty(db item) and press 'x' button it does't prompting 'Do you want to save the changes you have made?' message.
For displaying this message i have written following code in the APP_CUSTOM body:
IF (wnd = 'XXMZ_MRS_DET') THEN lv_wnd_stat := get_window_property('XXMZ_SUMMARY',VISIBLE); if lv_wnd_stat = 'TRUE' THEN IF :SYSTEM.form_status = 'CHANGED' THEN CLEAR_BLOCK(ASK_COMMIT); ELSE
[code]....
if i write above code in the app_custom body it's prompting the above message.But if i click 'YES' it does't save the records?
i want to update record that is fetched based on join condition on form
1. made a block manually :::: EMPSAL 2. Query DATA SOURCE NAME :::: EMP a, Sal b 3. Where Clause :::: a.empid = b.empid 4. DML DATA Target Type :::: Table 5. DML DATA Target Name :::: EMP a, Sal b 6. All Columns are marked a.empid, a.empname, b.sal, b.date etc
I would like to UPDATE the columns p1 and p2 of my table student (studentid:pk,name,p1,p2,...) for a given studentid.and I have a when-button-pressed trigger with this
UPDATE student SET student.p1=:validation.proj1, student.p2=:validation.proj2 where UPPER(student.studentid)=UPPER(:validation.studentid);commit_form;
when I run my form with a correct studentid, I got this error: FRM-40508: ORACLE error: UNABLE to INSERT record
but it is cworking correctly in sqlplus; and I have all priveligies.
I am getting a following odd result where the same a Job could be linked to multiple enquiries. What I want it to show is just one job if its linked to multiple enquiries. I show you some sample result:I wrote the following SQL for it:
SELECT 'Enquiry' as Origin, job.job_number, enquiry.enquiry_number as Defect_or_Enquiry, job.site_code, central_site.site_name, job.priority_code, priority.priority_name, job.target_comp_date, 'Target Completion Date required' as Due_Date [code]....
Is there anything you would add so that it shows just a unique job number where the job has multiple enquiries linked to it? I tried putting SELECT DISTINCT but that did not work.
when i running my form i m receiving this error message Error Message is "Could not reserve record (2 tries) keep trying ? " This is due to multi user Login, How can i avoid from this error message.
I have a button which leads me to a calendar and when I enter the record and when I press on a new record and I begin entering the other record this error frm-41009 appears to me so what can I do to get it over?
I am getting the same error on a form I am setting up under version 10.1.2 Form Builder. But when I press Shift-F1 I get a Getting Started with Internet Explorer popup. I am running the form under OAS. I have a parent/child relationship between 2 tables that I query on the form.