Form based on a view - FRM-40654: Record has been updated by another user.
Hi All,
I am hoping that somebody can help me with this problem that is occurring only when I try an update a record in forms.
I have a block based on a join-view, I can insert no problems, but I can only update certain records within the block. If I come across a second record that is similar to the first except for primary key and a couple of other values and try and update that record forms gives me the following message FRM-40654: Record has been updated by another user. Re-query to see change.
The first record I have no problems in updating and I have followed a number of suggestions to get this to work, like setting the key-mode of the block to updateable/non-updateable and setting the primary key to 'yes' for some of the database items. I have also created procedures within the database that are called by triggers on-insert, on-update etc.
If anybody has any ideas how I can solve this I would be happy to hear your suggestions.
Thanks in Advance.
Regards,
Scott.
Scott,
beside of
1) In the block properties change the Key Mode property of the block to be Non-Updatable Primary Key
2) Mark one or more columns as Primary Key in the item Property Palette - in this instance you would set the property for Empno.
Enforce Primary Key = no
Key Mode = Unique
Update Changed Columns Only = Yes
I found a bug entry that is supposed to be fixed in Patch 9 of Forms 6i (assuming you are running 6i). So if you could try with a more recent Patch set (e.g. 14) then probably the problem will go away.
Fran
Similar Messages
-
"FRM:40654 Record has been updated by another user" - Error in POST-QUERY
Hi,
I'm using Forms version 6.0.8.26.0
In one of the forms, its data block is based on a view.
In POST-QUERY trigger, I try to change the value for a database item. This operation results in following error:
"FRM-40654: Record has been updated by another user. Re-query to see change."
After this message the value of the item is automatically being set back to what was queried from the DB.
I tried setting the DML Returning Value to 'Yes'. It doesn't help :(
Any suggestions please?
Thanks,
UshaHy
try to set key-locking delayed
and check
if one field from the view as primary key
or
manually create On-Update, On-Insert, On-Delete and On-Lock triggers
or
write an INSTEAD OF TRIGGER -
FRM-40654 Record has been updated by another user.Re-query to see change.
Hi All:
While Updating a record in form its updating fine at first time
if i updating the record second time its not allowing me to update its showing following error
FRM-40654 Record has been updated by another user.Re-query to see change.
After Re-querying its allowing me to update the record .... so anyone can give a good idea to update the record without Re-query.
i am using following versions
Apps 11.5.10.2
Forms 6i
Database 10g@814950,
Welcome to the Oracle Forums. Please take a few minutes to review the following:
<ul>
<li>Before posting on this forum please read
<li>10 Commandments for the OTN Forums Member
<li>Announcement: Forums Etiquette / Reward Points
</ul>
It is not good to use someone else's post to ask a new question; this is commonly refered to as "Post Hi-jacking." It is always best to create a new post and add a reference link to a similar post. Please create a new post for your question!
Also,
>
BEFORE I NSERT OR U PDATE
OF quantity, price_override
ON po.po_line_locations_all
>
If I recall correctly from when I worked with the Oracle Enterprise Business Suite (EBS), the PO_LINE_LOCATIONS_ALL is an EBS ta ble. Oracle does not recommend you modify EBS tables directly. There are recommended methods for performing DML on EBS tables. I suggest you review the Oracle Applications Documentation library. Select your EBS version and then scroll to the Standards section and review the following documents:
<ul>
<li>Oracle Applications Developer's Guide
<li>Oracle Applications User Interface Standards for Forms-Based Products
<li>Oracle Application Framework Personalization Guide
</ul>
Again, please ask your question in a new post.
Craig...
Edited by: CraigB on Dec 1, 2010 9:29 AM -
Error!!!! Record has been updated by another user
dear all
Why i got this error when i put a value and try to write to a text item. i never change insert update etc in property pallete..
this error appear.
FRM-40654 Record has been updated by another user . requery to see change?
give me advise and suggestion why i got this error..This message have several different causes. One cause is what wilfred indicated.
But I've seen this message appear if there's something wrong with a primary key, and I've seen it occur when doing a post command using a master-detail block. In the latter case, you need to requiry the other tables in your form.
In your case since you are using only one block, I'd look for a problem with your primary key. -
Error in Multi Record Form. Record has been updated by another User?
Hi,
I ma developing Form with 3 blocks (Control Block, Database Block, Button Block). In the Button Block i am updating one Row by calling Program Units as shown below
Select Print Id into Flag From <Table Name> Where <Conditions> For Update of <Column Name>. after calling this , i created another Program Unit as
Update <Table Name>I assume that the table in your update statement is the same table as the one you based your block on.
You are manually updating the table, and Forms see this as an update "by another user" (even though it's you). To see the changes you made in your update statement, you have to re-query.
So, don't update yourself, let Forms do it. If you base a block on a table, everything is done for you by Forms. -
Any possibility of getting records have been updated by another user
is there any possibility of getting the error
--records have been updated by another user.please requery to see the changes.
i am getting this error when no other user connected to same data base and only one session is opened.
i am getting this error under below case.
there are 3 fields in a multiple record block.
field 1 will have the total amount.in field 2 i user can enter the percentage.and field 3 will be populated
as field 1 * field 2 /100. if user changes field 3 it back update the field 2 as field3 * 100/field 1.
there is a POST in when-new-record-instance.
the above error comes when i navigate to second record
and try to come bk and change the values in 1st record.
if any one faced this problem or have any idea of it
please let me know.thank u all
the round option solved my problem. But still i am not clear with why it is giving when i am in the same session. Is there any link where i can get more info. on this perticular issue.steve i am not fully convinced with what u have said. can u give more details on this.
once again i thank u all. -
Killing, Frm-40654 Record has been upd...Re-query to see change
believe me guys, this is my 3rd night scratching my head to find the solution for this error.
i saw some post, infact many posts, realize that its an age-old problem faced by many developers.
i have a master-detail Purchase_Order form, where there are 3 blocks;
1) purchase_order_header 2) purchase_order_details and 3) ctrl
CREATE TABLE purchase_ORDER_header
(POH_comp_CODE VARCHAR2(3) NOT NULL,
POH_CODE VARCHAR2(6) NOT NULL,
POH_DATE DATE NOT NULL,
POH_no number not null,
POH_quot_REF_code varchar2(6),
POH_QUOT_ref_NO NUMBER,
POH_PARTY_CODE VARCHAR2(6) NOT NULL,
POH_GROSS_fc_amount NUMBER(13,3),
POH_GROSS_lc_amount NUMBER(13,3),
POH_COMM_PERC NUMBER(6,3),
POH_COMM_fc_AMounT NUMBER(13,3),
POH_COMM_lc_AMounT NUMBER(13,3),
POH_NET_fc_amount NUMBER(13,3),
POH_NET_lc_amount NUMBER(13,3),
POH_FREIGHT_fc_amount NUMBER(13,3),
POH_FREIGHT_lc_amount NUMBER(13,3),
POH_CLEARING_fc_amount NUMBER(13,3),
POH_CLEARING_lc_amount NUMBER(13,3),
POH_SHIp_from varchar2(200),
POH_sHIP_to varchar2(200),
POH_tpt_MODE VARCHAR2(15),
POH_EXPECTED_date date,
POh_FX_rate number(12,8),
POH_REMARKS VARCHAR2(200),
POH_CR_UID VARCHAR2(12),
POH_CR_DT DATE,
POH_UPD_UID VARCHAR2(12),
POH_UPD_DT DATE,
conStraint POH_PK PRIMARY KEY (POH_COMP_CODE,POH_code,POH_NO));
NON-db item used at purchase_order_header block level;
poh_party_name,m_cntry_name, m_prev_tot_amt_scy, m_prev_tot_amt_lcy, m_curr_code_scy, m_curr_code_scy_disp,
CREATE TABLE purchase_ORDER_DETAIL
(POD_COMP_CODE VARCHAR2(3) NOT NULL,
POD_DATE DATE not null,
POD_POH_CODE VARCHAR2(6) NOT NULL,
POD_POH_NO NUMBER(10) NOT NULL,
POD_prod_CODE VARCHAR2(6) not null references product_MAstER(prod_CODE),
POD_uom varchar2(6),
POD_CURR_CODE VARCHAR2(3),
POD_QTY NUMBER(10) not null,
POD_RATE NUMBER(9,3) not null,
POD_LC_AMOUNT NUMBER(13,3),
POD_FC_amount NUMBER(13,3),
POD_REMARKS VARCHAR2(200),
POD_CR_UID VARCHAR2(12),
POD_CR_DT DATE,
POD_UPD_UID VARCHAR2(12),
POD_UPD_DT DATE,
CONSTRAINT POD_fk FOREIGN KEY (POD_COMP_CODE,POD_POH_CODE, POD_POH_no) REFERENCES
PURCHASE_ORDER_headER(POH_COMP_CODE,POH_code,POH_NO) ON DELETE CASCADE);
NON-db item used at purchase_order_detail block level;
pod_prod_name
*ctrl*
m_old_vah_no
m_user_id
m_comp_code
m_cursor_hint_rec
m_txn_title
m_cr_uid_disp
m_cr_dt_disp
m_curr_code_bcy
m_brok_cntry_code
though multi-user form, but right now ii am the only single user using.
i was just testing this form by querying records and repeatedly changing values inside form and saving,
just to confirm the validation are being performed as expected.
how form is behaving, on some records, it is allowing me changing values over-n-over without the error(above),
but on some records it allows editing, but if i repeat changing values, the error is flashed.
based on the discussion i tried & change my form at various places as suggested. such as,
setting DML Returning values=Yes
trigger at form-level
*WNFI*
:M_cr_DT_disp := SYSDATE;
:poH_date := SYSDATE;
:POH_tpt_MODE := 'Road';
SET_ITEM_PROPERTY('POH_NO',ENABLED,PROPERTY_FALSE);
*WNRI*
:M_CR_DT_DISP := SYSDATE;
*KEY-COMMIT*
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'BUSY');
COMMIT_FORM;
POST_COMMIT_ACTION;
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'DEFAULT');
CHECK_PacKaGe_FAILURE ;
GO_BLOCK('PURCHASE_ORDER_HEADER');
*PRE-COMMIT*
BEGIN
:M_OLD_VAH_NO := :poh_NO ;
END;
*PRE-FORM*
:M_COMP_CODE := :GLOBAL.M_COMP_CODE;
:M_COMP_NAME := :GLOBAL.M_COMP_NAME;
:M_USER_UID := :GLOBAL.M_USER_UID;
:poH_CODE := :GLOBAL.POh_CODE;
:poH_COMP_CODE := :GLOBAL.M_COMP_CODE;
:M_TXN_TITLE := :GLOBAL.M_TXN_TITLE;
SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,TITLE,:GLOBAL.M_WINDOW_TI
TLE);
SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW,WINDOW_STATE,MAXIMIZE);
:GLOBAL.M_LANG_CODE := 'ENG';
*ON-CLEAR-DETAILS* <SYSTEM GENERATED)
*KEY-EXIT*
CLEAR_BLOCK(NO_VALIDATE);
CLEAR_FORM(NO_VALIDATE);
EXIT_FORM(NO_VALIDATE);
my header-block-level triggers, pre-updates
:POH_UPD_UID := :M_USER_UID;
:POH_UPD_DT := SYSDATE;
pre-insert
headerblock
:POH_CR_UID := :M_USER_UID;
:POH_CR_DT := SYSDATE;
P_GEN_DOC_NO(:poH_NO,:poH_CODE,'001');
CHK_UNIQUE_DOC_NO;
pre-delete
system generated
pre-record
:M_CR_DT_DISP := :POH_CR_DT ;
:M_CR_UID_DISP := :POH_CR_UID;
:M_TXN_TITLE := 'P U R C H A S E';
key-entqry
CLEAR_RECORD;
CLEAR_BLOCK(NO_VALIDATE);
CLEAR_BLOCK(NO_VALIDATE);
ENTER_QUERY;
post-query
DECLARE
CURSOR C_SUPL_CODE IS SELECT SUPL_NAME, SUPL_cntry_CODE
FROM SUPPLIER_MASTER
WHERE SUPL_CODE = :POH_PARTY_CODE;
CURSOR C_BRok_CURR Is SELECT CNTRY_NAME, CNTRY_CURR_CODE
from INVS_country
where CNTRY_code = :m_BROK_CNTRY_code;
M_DUMMY VARCHAR2(1);
BEGIN
OPEN C_SUPL_CODE;
FETCH C_SUPL_CODE INTO :POH_PARTY_NAME,:M_brok_CNTRY_code;
IF C_SUPL_CODE%NOTFOUND THEN
MESSAGE('PCPlease create the Supplier of this code!');
MESSAGE(' ');
RAISE FORM_TRIGGER_FAILURE;
END IF;
CLOSE C_SUPL_CODE;
OPEN C_brok_Curr;
FETCH C_brok_Curr INTO :M_CNTRY_NAME, :M_CURR_CODE_SCY;
CLOSE C_BROK_curr;
:M_CURR_CODE_SCY := '('||:M_CURR_CODE_SCY||')';
:M_CURR_CODE_SCY_DISP := :M_CURR_CODE_SCY;
END;
on-populate-details
<system generated on creating Relationship header-detail>
trigger at detail block-level
pre-update
:pod_UPD_UID := :M_USER_UID;
:POD_UPD_DT := SYSDATE;
pre-insert
:POD_CR_UID := :M_USER_UID;
:POD_CR_DT := SYSDATE;
:POD_DATE := :POH_DATE;
:POD_curr_code := SUBSTR(:M_curr_CODE_SCY,2,3);
pre-record
:M_PREV_TOT_AMT_SCY := NVL(:POH_GROSS_fc_AMOUNT,0) -
NVL(:POD_fc_AMOUNT,0);
:M_PREV_TOT_AMT_LCY := NVL(:poH_GROSS_LC_AMOUNT,0) -
NVL(:poD_lc_AMOUNT,0);
when-remove-record
:poH_GROSS_fc_AMOUNT := NVL(:poH_GROSS_fc_AMOUNT,0) -
NVL(:POD_fC_AMOUNT,0);
:poH_GROSS_Lc_AMOUNT := NVL(:poH_GROSS_Lc_AMOUNT,0) -
NVL(:POD_LC_AMOUNT,0);
:POH_COMM_fc_Amount := NVL(:poH_GROSS_fc_AMOUNT,0)* NVL(:poH_COMM_PERC,0)/100;
:POH_COMM_LC_Amount := NVL(:poH_GROSS_Lc_AMOUNT,0)* NVL(:poH_COMM_PERC,0)/100;
:PoH_NET_FC_AMOUNT := NVL(:poH_GROSS_fc_AMOUNT,0) -
NVL(:poH_COMM_fc_AMOUNT,0) +
NVL(:POH_freight_FC_amount,0) +
NVL(:POH_CLEARING_fc_amount,0) ;
:POH_NET_lc_AMOUNT := NVL(:poH_GROSS_Lc_AMOUNT,0) -
NVL(:poH_COMM_LC_AMOUNT,0) +
nvl(:POH_freight_lC_amount,0) +
nvl(:POH_CLEARING_lc_amount,0) ;
post-query
DECLARE
CURSOR C_PROD IS SELECT prod_NAME
FROM PRODUCT_MASTER
WHERE PROD_CODE = :poD_PROD_CODE;
BEGIN
OPEN C_PROD;
FETCH C_PROD INTO :pod_PROD_name;
IF C_PROD%NOTFOUND THEN
MESSAGE('DPROD does not exists!');
MESSAGE(' ');
RAISE FORM_TRIGGER_FAILURE;
END IF;
CLOSE C_PROD;
END;
i have button-pallette for horizantal canvas used for iconic button for,
m_comp_name (display_item)
previous_record,next_record,go_top,go_bottom,query,save,exit,d
elete_record,create_record,copy_record,
clear & print. all are iconic button with just 1 trigger
when-button-pressed
SET_ITEM_PROPERTY('CTRL.M_CURSOR_HINT_REC',DISPLAYED,PROPERTY_
FALSE);
:M_CURSOR_HINT_REC := '';
do_key('...
PROGRAM UNITS PROCEDURES
PROCEDURE CHK_UNIQUE_DOC_NO IS
CURSOR C_poH IS
SELECT 'X'
FROM purchase_ORDER_HEADer
WHERE POH_COMP_CODE = :POH_COMP_CODE
AND POH_CODE = :POH_CODE
AND POH_NO = :POH_NO;
DUMMY VARCHAR2(1);
BEGIN
IF :PURCHAsE_order_HEADer.ROWID IS NULL THEN
OPEN C_poH;
FETCH C_poH INTO DUMMY;
IF C_poH%FOUND THEN
MESSAGE('TXN NO. ALREADY EXISTS IN PAY_VCH_TXN_HEAD TABLE');
MESSAGE(' ');
CLOSE C_poH;
RAISE FORM_TRIGGER_FAILURE;
END IF;
CLOSE C_poH;
END IF;
END;
PROCEDURE POST_COMMIT_ACTION IS
M_MSG VARCHAR2(30);
BEGIN
IF :poH_NO != :M_OLD_VAH_NO THEN
-- STD_ERROR_ROUTINE(105002, :GLOBAL.M_LANG_CODE, TO_CHAR(:VAH_NO));
M_MSG := 'New Document is'||' '||TO_CHAR(:poH_NO);
MESSAGE(M_MSG);
END IF;
END;
PROCEDURE P_GEN_DOC_NO
(P_DOC_NO IN OUT NUMBER,
P_TXN_CODE IN VARCHAR2,
P_COMP_CODE IN VARCHAR2) IS
M_CURR_NO PM_TXN_DOC_RANGE.TXND_CURR_NO%TYPE ;
M_TO_NO PM_TXN_DOC_RANGE.TXND_TO_NO%TYPE ;
M_ROWID VARCHAR2(20) ;
CURSOR C1 IS
SELECT NVL(TXND_CURR_NO, 0) + 1, NVL(TXND_TO_NO, 0), ROWID
FROM PM_TXN_DOC_RANGE
WHERE TXND_COMP_CODE = P_COMP_CODE
AND TXND_TXN_CODE = P_TXN_CODE
FOR UPDATE OF TXND_CURR_NO ;
BEGIN
OPEN C1;
FETCH C1 INTO M_CURR_NO, M_TO_NO, M_ROWID ;
IF C1%NOTFOUND THEN
CLOSE C1;
MESSAGE('TRANSACTION NO. NOT INITIALISED');
MESSAGE(' ');
RAISE FORM_TRIGGER_FAILURE;
END IF ;
IF M_CURR_NO > M_TO_NO THEN
MESSAGE('CURRENT TXN NO. IS OVER THE LIMIT');
MESSAGE(' ');
RAISE FORM_TRIGGER_FAILURE;
END IF ;
P_DOC_NO := M_CURR_NO ;
UPDATE PM_TXN_DOC_RANGE
SET TXND_CURR_NO = P_DOC_NO
WHERE ROWID = M_ROWID ;
CLOSE C1;
END;
PROCEDURE P_GEN_DUMMY_DOC_NO
(P_DOC_NO IN OUT NUMBER,
P_TXN_CODE IN VARCHAR2,
P_COMP_CODE IN VARCHAR2) IS
M_CURR_NO PM_TXN_DOC_RANGE.TXND_CURR_NO%TYPE ;
M_TO_NO PM_TXN_DOC_RANGE.TXND_TO_NO%TYPE ;
CURSOR O_GET_DOC_NO IS
SELECT NVL(TXND_CURR_NO, 0) + 1, NVL(TXND_TO_NO, 0)
FROM PM_TXN_DOC_RANGE
WHERE TXND_COMP_CODE = P_COMP_CODE
AND TXND_TXN_CODE = P_TXN_CODE;
BEGIN
OPEN O_GET_DOC_NO;
FETCH O_GET_DOC_NO INTO M_CURR_NO, M_TO_NO ;
IF O_GET_DOC_NO%NOTFOUND THEN
MESSAGE('DUMMTRANSACTION NO. NOT INITIALISED');
MESSAGE(' ');
RAISE FORM_TRIGGER_FAILURE;
END IF ;
CLOSE O_GET_DOC_NO;
IF M_CURR_NO > M_TO_NO THEN
MESSAGE('DUMMCURRENT TXN NO. IS OVER THE LIMIT');
MESSAGE(' ');
RAISE FORM_TRIGGER_FAILURE;
END IF ;
P_DOC_NO := M_CURR_NO ;
END;i request,please please please,,advice me something as it has taken very long.
i would welcome and be greatful ever if someone ask me to send the .fmb file and have look at it.poelger wrote:
Make sure that the fields you use in your form don't have trailing spaces in the database.you mean my db table fields length is greater than the ones displayed on form?
for example my POD_RATE is NUMBER(9,3) and on form its Maximum length is 11,
so if i enter 2.5, will you say that my db field POD_RATE has trailing space?
i tried to change some form fields length to match with the db fields length.
but now the form has become wild, it is flashing this error on the screen many times on change and navigation
and even while exit form -
FRM-40657: Record changed or deleted by another user.
I have a forms module with a module component based on a view.
This view is a simple view with 1 base table.
This view has a 'client derived' primary key with a sequence.
This view has a instead of trigger, which is calling the table API.
There are no server derived columns etc.
When I insert a record via the form and try to update the same record
without requery, I get the message:
FRM-40657: Record changed or deleted by another user.
When I drop the trigger the error is not raised.
Any idea ?
Configuration:
Forms 6.0.5
Designer 6.0.5
Headstart 5.1
Oracle 8.1.7.4.0From Documment : 1236623.1
Cause:
1. Navigation from (Responsibility) System Administrator > Security > User > Define > Query out the responsibility, found responsibility key is <NEW_VALUE>. ..................... This is wrong Navigation
2. Found value <OLD_VALUE> is included in column role_name of the responsibility under the user by sql statement:......................................................................................... Not sure whats the old Value
select * from wf_local_user_roles
where user_name = '<user_name>'
and role_name like '%<OLD_VALUE>%';
Solution :
4. Identify the Role (responsiblity) to be changed, click 'Show' to expand the record, select a date to field 'Active To' to provide an end date to this role assignment. ..... Not sure how to get role for particular responsibility.
From Document : 1273157.1
We have created new responsibility , But now we are getting error while END_DATE old responsibility.
New Responsiblity name : BPC-160 DC Staff-New
Old : BPC-160 DC Staff -
Error FRM-40657:Record Change or deleted by another user
Hi dears
Please HELP ME
I have a form with multiple blocks and relationship between them
I can insert in all of the blocks
but I can not update the exiting rows in ANY block in application.
I can update the rows from outside of the application
it returns me this error:
FRM-40657:Record Change or deleted by another user
the properties about insert allowed,update allowed and so on are all YES in all blocks
Would you please advise me about that?
Need your help
thanks
ShahramThis error occurs because the record as held in the Form is not the same as that held on the database. When Forms locks a record it checks the value of every database item on the Form with that currently stored in the database, and if the two are not the same it issues this error.
This can happen for a number of reasons e.g.
1. You may want to look at date fields and ensure the time component is being taken into account i.e. the LAST_MODIFIED column is stored as '01-JAN-2001 15:34:56' on the database but is stored as '01-JAN-2001 00:00:00' (a truncated date) on the Form.
2. Check to see if there are any database triggers which alter the values of columns.
You may need to go through every database item on the Form and compare it with the value on the database. Having found a discrepancy in values you need to determine why this occurs. -
Record has already been updated by another user. Please re-query and retry
Hi,
I want to uncheck the option Send e-mails for canceled notifications in Workflow mailer but getting error in fouth step in workflow Notification mailer:-
1. Connect to Oracle Applications Manager with SYSADMIN.
2. select Workflow manager.
3. Click on EDIT button-->Advanced(Step 1)--->next(step 2)--->next(step 3)---"ERROR"
This record has already been updated by another user. Please re-query and try again. ORA-06512: at "APPS.FND_SVC_COMP_PARAM_VALS_PKG", line 288 ORA-06512: at line 1
Regards,Pl see if MOS Doc 286418.1 (ORA-06512: At Fnd_svc_comp_param_vals_pkg When Configuring The Java Mailer) can help
HTH
Srini -
FRM-40657 - Record changed or deleted by another user: HELP!
No matter what I do, any form I create gives me this error when I try to change any field. I've read the other postings and understand that this happens because the data on the form does not match the data on the DB. I've created a form with just a few VARCHAR2 and CHAR fields (no DATEs) and the data displaying is exactly what I get when I SELECT the row with SQL*Plus. What is going on here?
Please help!!! Otherwise this whole app will have to inquiry only!!!!Check that you've not got extra whitespace characters at the end of the varchar2 date in the databse (e.g. ASCII 20, Forms will strip this off automatcially when it's got a varchar2 column and the locking will fail because the stripped value in Forms will not match the DB value.
You can get extra whitespace if this data happens to have been loaded through something other than Forms. -
Oracle form based on a view - need to return a value after database trigger
We have a form based on a view calling database trigger to insert data.
I need to display a message of the record ID inserted on the form.
The values to be displayed are ID field.Hi,
if you use process of Automatic Row Processing (DML), you have an option *"Return Key Into Item"*.
This will return your primary key into item, and then you can display this item as a result.
Regards,
Aljaz -
hi I have a form based on multiple views
when try to query the data in this form
I get this error
An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
An unexpected error occurred: ORA-01445: cannot select ROWID from a join view without a key-preserved table (WWV-16016)
nullRight now you will be able to base a portal form only on updatable views. Non updatable views are not supported.
As a work around you can use QBE reports to query the data, without having the delete and update links.
Regards,
Sunil.
null -
FRM-40600: Record has already been inserted.
I am using Form 9i.
I have written a procedure to save master-detail form which is called when WHEN-BUTTTON-PRESSED trigger written in submit button..
I have written this procedure because I am confident in writing procedure for save button. But it gives error - 'FRM-40600: Record has already been inserted.'.
When I was using default (form) for saving record, I was getting lot of message (error). I was getting confused seeing this message. That's why I have written save button procedure. I don't know whether I am doing wrong or right.
Before posting, I searched in forum also and found some post regarding this, but still I am unable to find the solution.
Anyway, I am giving you code for save procedure -
PROCEDURE save_workorder IS
v_count NUMBER;
BEGIN
SELECT COUNT(*) INTO v_count FROM workorder_master
WHERE workorder_no = :workorder_master.workorder_no;
IF v_count = 0 THEN
GO_BLOCK('workorder_master');
INSERT INTO workorder_master (
vender_code,
workorder_no,
auth_rep,
workplace,
work_desc,
from_dt,
to_dt,
tot_manpower,
gp_manpower,
lic_no,
lic_recpt_no,
lic_valid_upto,
eic_name,
status,
remarks,
entry_by,
entry_dt)
VALUES(
:workorder_master.vender_code,
:workorder_master.workorder_no,
:workorder_master.auth_rep,
:workorder_master.workplace,
:workorder_master.work_desc,
:workorder_master.from_dt,
:workorder_master.to_dt,
:workorder_master.tot_manpower,
:workorder_master.gp_manpower,
:workorder_master.lic_no,
:workorder_master.lic_recpt_no,
:workorder_master.lic_valid_upto,
:workorder_master.eic_name,
:workorder_master.status,
:workorder_master.remarks,
:workorder_master.entry_by,
:workorder_master.entry_dt);
GO_BLOCK('workorder_dtls');
FIRST_RECORD;
LOOP
EXIT WHEN :workorder_dtls.labour_code IS NULL;
IF :workorder_dtls.pass_no IS NULL THEN
generate_pass_no;
IF :workorder_dtls.pass_no IS NOT NULL THEN
:workorder_dtls.status := 'I';
INSERT INTO workorder_dtls (
labour_code,
workorder_no,
pass_no,
status,
from_dt,
to_dt,
cancil_dt,
issue_dt,
return_dt,
entry_by,
entry_dt)
VALUES (:workorder_dtls.labour_code,
:workorder_dtls.workorder_no,
:workorder_dtls.pass_no,
:workorder_dtls.status,
:workorder_dtls.from_dt,
:workorder_dtls.to_dt,
:workorder_dtls.cancil_dt,
:workorder_dtls.issue_dt,
:workorder_dtls.return_dt,
:workorder_master.entry_by,
:workorder_master.entry_dt);
END IF;
ELSE --if pass no is not null then it is previous record.
UPDATE workorder_dtls SET status = :workorder_dtls.status,
cancil_dt = :workorder_dtls.cancil_dt,
return_dt = :workorder_dtls.return_dt,
entry_by = :workorder_dtls.entry_by,
entry_dt = :workorder_dtls.entry_dt
WHERE labour_code = :workorder_dtls.labour_code
AND workorder_no = :workorder_dtls.workorder_no
AND pass_no = :workorder_dtls.pass_no;
END IF;
IF :workorder_dtls.status = 'I' THEN
UPDATE labour_master SET status = 'I'
WHERE labour_code = :workorder_dtls.labour_code;
END IF;
IF :workorder_dtls.status = 'E' THEN
IF :workorder_dtls.return_dt IS NOT NULL THEN
UPDATE labour_master SET status = 'A'
WHERE labour_code = :workorder_dtls.labour_code;
ELSE
UPDATE labour_master SET status = 'H'
WHERE labour_code = :workorder_dtls.labour_code;
END IF;
END IF;
IF :workorder_dtls.status = 'B' THEN
IF :workorder_dtls.return_dt IS NOT NULL THEN
UPDATE labour_master SET status = 'A'
WHERE labour_code = :workorder_dtls.labour_code;
ELSE
UPDATE labour_master SET status = 'S'
WHERE labour_code = :workorder_dtls.labour_code;
END IF;
END IF;
NEXT_RECORD;
END LOOP;
ELSE --if workorder exist
GO_BLOCK('workorder_master');
UPDATE workorder_master SET auth_rep = :workorder_master.auth_rep,
workplace = :workorder_master.workplace,
work_desc = :workorder_master.work_desc,
from_dt = :workorder_master.from_dt,
to_dt = :workorder_master.to_dt,
tot_manpower = :workorder_master.tot_manpower,
gp_manpower = :workorder_master.gp_manpower,
lic_no = :workorder_master.lic_no,
lic_recpt_no = :workorder_master.lic_recpt_no,
lic_valid_upto= :workorder_master.lic_valid_upto,
eic_name = :workorder_master.eic_name,
status = :workorder_master.status,
remarks = :workorder_master.remarks,
entry_by = :workorder_master.entry_by,
entry_dt = :workorder_master.entry_dt
WHERE vender_code = :workorder_master.vender_code
AND workorder_no = :workorder_master.workorder_no;
GO_BLOCK('workorder_dtls');
FIRST_RECORD;
LOOP
EXIT WHEN :workorder_dtls.labour_code IS NULL;
IF :workorder_dtls.pass_no IS NULL THEN
generate_pass_no;
IF :workorder_dtls.pass_no IS NOT NULL THEN
:workorder_dtls.status := 'I';
INSERT INTO workorder_dtls (
labour_code,
workorder_no,
pass_no,
status,
from_dt,
to_dt,
cancil_dt,
issue_dt,
return_dt,
entry_by,
entry_dt)
VALUES (:workorder_dtls.labour_code,
:workorder_dtls.workorder_no,
:workorder_dtls.pass_no,
:workorder_dtls.status,
:workorder_dtls.from_dt,
:workorder_dtls.to_dt,
:workorder_dtls.cancil_dt,
:workorder_dtls.issue_dt,
:workorder_dtls.return_dt,
:workorder_master.entry_by,
:workorder_master.entry_dt);
END IF;
ELSE --if pass no is not null then it is previous record.
UPDATE workorder_dtls SET status = :workorder_dtls.status,
cancil_dt = :workorder_dtls.cancil_dt,
return_dt = :workorder_dtls.return_dt,
entry_by = :workorder_dtls.entry_by,
entry_dt = :workorder_dtls.entry_dt
WHERE labour_code = :workorder_dtls.labour_code
AND workorder_no = :workorder_dtls.workorder_no
AND pass_no = :workorder_dtls.pass_no;
END IF;
IF :workorder_dtls.status = 'I' THEN
UPDATE labour_master SET status = 'I'
WHERE labour_code = :workorder_dtls.labour_code;
END IF;
IF :workorder_dtls.status = 'E' THEN
IF :workorder_dtls.return_dt IS NOT NULL THEN
UPDATE labour_master SET status = 'A'
WHERE labour_code = :workorder_dtls.labour_code;
ELSE
UPDATE labour_master SET status = 'H'
WHERE labour_code = :workorder_dtls.labour_code;
END IF;
END IF;
IF :workorder_dtls.status = 'B' THEN
IF :workorder_dtls.return_dt IS NOT NULL THEN
UPDATE labour_master SET status = 'A'
WHERE labour_code = :workorder_dtls.labour_code;
ELSE
UPDATE labour_master SET status = 'S'
WHERE labour_code = :workorder_dtls.labour_code;
END IF;
END IF;
NEXT_RECORD;
END LOOP;
END IF;
COMMIT;
END;
Thanks and regards,
VikasYes Sir, why not.
This procedure is written in KEY-NEXT-ITEM of workorder_no, the only trigger in workorder_no. Block level-trigger is also there. like ON-POPULATE-DETAILS, ON-CHECK-DELETE-MASTER.
Thanks and regards,
Vikas
[HTML]
DECLARE
V_VENDER_CODE NUMBER;
REL_ID RELATION;
BEGIN
BEGIN
SELECT VENDER_CODE INTO V_VENDER_CODE FROM WORKORDER_MASTER WHERE WORKORDER_NO = :WORKORDER_MASTER.WORKORDER_NO ;
:BLK_TEMP_WORKORDER.WORKORDER_NO := :WORKORDER_MASTER.WORKORDER_NO;
:BLK_TEMP_WORKORDER.VENDER_CODE := V_VENDER_CODE;
IF ( (:WORKORDER_MASTER.WORKORDER_NO is not null) ) THEN
rel_id := Find_Relation('WORKORDER_MASTER.WORKORDER_MASTE_WORKORDER_DTLS');
Query_Master_Details(rel_id, 'WORKORDER_DTLS');
SET_ITEM_PROPERTY('BLK_TEMP_WORKORDER.CB_ALL' , ENABLED , PROPERTY_TRUE);
END IF;
GO_BLOCK('WORKORDER_MASTER');
EXECUTE_QUERY(NO_VALIDATE);
GO_BLOCK('WORKORDER_MASTER_IMG');
EXECUTE_QUERY(NO_VALIDATE);
:WORKORDER_MASTER.VENDER_CODE := :BLK_TEMP_WORKORDER.VENDER_CODE;
:WORKORDER_MASTER.WORKORDER_NO := :BLK_TEMP_WORKORDER.WORKORDER_NO ;
GO_ITEM('WORKORDER_MASTER.AUTH_REP');
EXCEPTION
WHEN NO_DATA_FOUND THEN
MESSAGE('NO VENDER HAVING WORKORDER NO. '||:WORKORDER_MASTER.WORKORDER_NO ||' EXIST.');
IF :WORKORDER_MASTER.VENDER_CODE IS NULL THEN
GO_ITEM('WORKORDER_MASTER.VENDER_CODE');
ELSE
:BLK_TEMP_WORKORDER.WORKORDER_NO := :WORKORDER_MASTER.WORKORDER_NO;
:BLK_TEMP_WORKORDER.VENDER_CODE := :WORKORDER_MASTER.VENDER_CODE;
GO_BLOCK('WORKORDER_MASTER');
EXECUTE_QUERY(NO_VALIDATE);
GO_BLOCK('WORKORDER_MASTER_IMG');
EXECUTE_QUERY(NO_VALIDATE);
:WORKORDER_MASTER.VENDER_CODE := :BLK_TEMP_WORKORDER.VENDER_CODE;
:WORKORDER_MASTER.WORKORDER_NO := :BLK_TEMP_WORKORDER.WORKORDER_NO ;
SELECT name INTO :workorder_master.auth_rep FROM contractor_master
WHERE vender_code = :workorder_master.vender_code;
GO_ITEM('WORKORDER_MASTER.AUTH_REP');
END IF;
END;
END;[HTML] -
The record has been changed....on default form
Hi,
I'm facing a strange problem....
Trying to alter the prompt in the menu default form, for one and only one record, the message "The record has been changed.Re-query to see the changes." appears...!!!
I have seen this message on custom forms.... but on default form which also insists even when i close the form and re-open it..., first time....
What do you suggest me to do...???
Note: I use eBS 11.5.10.2 and DB10g v.2
Thank you,
SimHi sgalaxy,
It looks the system is detecting something different between the record shown in the form and the record stored in the DB table, and that's why it's showing the error message. Typically the issue is caused by date columns that are truncated in the form or by trailing spaces in text columns. You will need to compare columns in form and DB table until you find the problematic column and update it manually (truncating date or removing trailing spaces in DB)
Hope it helps.
Maybe you are looking for
-
Changing meeting date/time doesn't reflects to all atendees
... but everybody gets a mail notification of the change. We cannot figure out whats happening. We tried to reproduce the problem but we couldn't. Anyway we can see: a) The owner of the event has his calendar modified b) Everybody got mail notificati
-
Error in defining a property & property-alias for a correlation for a BPEL
hallo, would anybdy be kind enough to tell me where i've done somthing wrong? im using netbeans 6.1 for SOA application development. there are two receive activities in a BPEL, recieve1 and recieve2. on the latter i have defined a correlation whose i
-
How do you change the size of a picture?
Product name and number: Photosmart Premium Fax e-ALL IN-ONE C410 series, C410a from SusieQ6
-
I am having issues with logicpro x and garage band using marverics. After the installation is done when opening the program almost 90% trhu i get an error message content could not download because of internet connectivity. I try different connection
-
Copy query with all language-dependend settings
Dear all, this is my first post message in SDN. I want to copy a query ("query_a" => "query_b") without loosing my translations of the key-figures, structures and cell definitions. If I use the query designer, these texts will be only copied in my lo