Error 40501 [message #642281] |
Sat, 05 September 2015 21:55 |
|
shumail
Messages: 149 Registered: September 2012 Location: Canada
|
Senior Member |
|
|
Hi All
I was stuck on one issue for several hours and appreciate if someone help you out...
In my form I have 1 data block that contained 2 tables fields, When I take property of this data block and over there I can see 2 tables in query data source name and those names are sage and cases...
In block property I can also see Where condition in which I can see joining between both tables.
Under block property , I can also see another heading that is call advanced database and under this I can see another sub property that is called DML data target name and that contain only 1 table that name is sage table.
In form layout , I have multiple columns and I want to update 1 column from sage table and 1 column from case table but when I try to update any field then I can see the following message :
I also checked my privilege and update those column in database by using SQL developer then I can see update records over there means I don't have any issue related to privilege .
I really appreciate if someone help me out to remove this error
Regards
Shumail
|
|
|
|
Re: Error 40501 [message #642358 is a reply to message #642282] |
Tue, 08 September 2015 10:00 |
|
CraigB
Messages: 386 Registered: August 2014 Location: Utah, USA
|
Senior Member |
|
|
Quote:"FRM-40501 - Unable to reserve record for update"
It sounds like you are joining two tables in your Data Block. You are most likely receiving this error because you do not exclusively identify each column in your block or you do not have the PK columns of the tables included in your block. For example, if you built your block on the HR.EMPLOYEES and HR.DEPARTMENTS tables, your Query Data Source Name property of the block will be: hr.employees, hr.deparments and the WHERE clause property will be: employees.department_id = departments.department_id. Each item displayed in your block must preface the column name with the table name, eg: Column Name property = employees.employee_id, etc. Additionally, you will need to include the PK columns (employee_id and department_id in this example) from both tables in your Data Block. These columns need to be in the block (even if they are not displayed on a canvas) so Forms can lock/reserve the record for update.
If you are not joining the tables in your Block, how is your data block configured?
Craig...
[Updated on: Tue, 08 September 2015 10:01] Report message to a moderator
|
|
|
|
|
Re: Error 40501 [message #642401 is a reply to message #642393] |
Wed, 09 September 2015 11:52 |
|
shumail
Messages: 149 Registered: September 2012 Location: Canada
|
Senior Member |
|
|
Hi Craig
I followed all your mentioned steps but no luck. Please find below details.
I have 2 tables, 1 is base and the other one is cse.
In base table, primary key is appear_id
In cse table, primary key is case_id.
Step 1
Create data block manually and configure it like below:
--Query Data Source Name= base,cse
--Where Clause = WHERE base.case_id = cse.case_id
--DML Data Target Name = base,cse
Step 2
Add 1st item base.appear_id in data block and preface the column name with the table name.
Add 2nd item base.lang in data block and preface the column name with the table name.
Add 3rd item cse.case_id in data block and preface the column name with the table name.
Step 3
Run form and go to enter query mode , enter required data and tried to update base.lang field but getting error FRM-40501 : Oracle error: unable to reserve record for update or delete
Please suggest
[Updated on: Wed, 09 September 2015 11:53] Report message to a moderator
|
|
|
|
Re: Error 40501 [message #642490 is a reply to message #642431] |
Fri, 11 September 2015 18:02 |
|
shumail
Messages: 149 Registered: September 2012 Location: Canada
|
Senior Member |
|
|
Thanks for your answer Craig and it looks like that I cannot define 2 DML data sources as you mentioned.
I used your provided link document and solved my issue. Thanks again
Regards
Shumail
|
|
|