Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

FRM-41051: You cannot create records here

711216Apr 8 2010 — edited Apr 8 2010
Hello all,

I have two blocks 'FIND_EMP' and EMP_HDR.

In 'FIND_EMP' i have fields below like

Dept name -------

Location ------

EMP no -------------

find(button) new_emp(button)

I you need to create a new employee we need to select dept name and location from lov and click new emp button.Then it will navigate to EMP_HDR block

In EMP_HDR block i have fields below like


Dept name -------(wiil be defaulted from 'FIND_EMP' block)

Location ------(wiil be defaulted from 'FIND_EMP' block)

EMP NAME ---------(USER INPUT)

DOB-----------(USER INPUT)

Emp no----------(populates a sequence no when user clicks submit)

Submit(button)

for the coresponding dept name and location user enters new employee name and dob and clicks submit button then empno field will be populated and it will close the EMP_HDR block window and will return to 'FIND_EMP' block.

Again if I try to create new employee by pressing new_emp(button) it is giving an error message below.Even in the block level propery pallete also insert allowed and update allowed is set to YES

"FRM-41051: You cannot create records here." (ie,Do not attempt to create and insert new records into this block until you have set the Insert Allowed block property to True.)

To avoid the above error i enabled the block property insert allowed to true under new_emp(button) logic

SET_BLOCK_PROPERTY('EMP_HDR',INSERT_ALLOWED,PROPERTY_TRUE);

now it is not giving any error and everything is working fine.

But my doubt here is before block property insert allowed to true is not enabled, then
for the first time I try to create new employee it is creating a record and for the same session
creating again new employee it is giving error message(FRM-41051). I could not understand.Any body please clarify on this.

Regards,
Kiran
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 6 2010
Added on Apr 8 2010
2 comments
6,194 views