Solved

Form Problem ---You cannot update this record

Posted on 2001-06-27
8
3,496 Views
Last Modified: 2010-07-27
Dear Friends

Please look on my problem and let me know.


I have four blocks in the form

Master
Question
Detail
Responce_detail.

MAster have a Exam No. and other related fields. Question block retrieve the data from a table depending upon Exam No. Every question has multple choices Answer. Which retrived in Detail Block. In Detail block there is a field Selected. Which marks the Answer Choice.


Then there is a Block in which I want to Save Temporarily the Checked Answer, Till I issue commit.


The reason for the third block is, I issue a query for the next question depending upon the answer of the current question.


When I want to add a record in   Responce_detail Block, First record can be add with out error. But after that

There is an error message "

FRM-41050: You cannot update this record. (I checked this error, it says about Block updteable property, which is Yes in My case).

But after this message Record is added in the block.

Here is the code which I use to to this job.

If :Responce_detail.AnswerID is not null then
     Go_item('responce_detail.QuestionID');
     create_record;
     Next_record;
End if;    
     :Responce_detail.AnswerID := :Detail.AnswerID;
     :Responce_detail.QuestionID := :Question.QuestionID;
     :Responce_detail.Survey_code := :Detail.survey_code;
     :Responce_detail.Responce_NO := :Master.Responce_NO;

IF :Detail.Following_Question is null then
     Set_Item_Property('Question.NextQuestion',ENABLED,PROPERTY_FALSE);
     Go_item('Question.QuestionID');
     Next_REcord;
     Go_item('Detail.Selected');
ELSE
     Set_Item_Property('Question.NextQuestion',ENABLED,PROPERTY_TRUE);
 :master.Following_question := :Detail.Following_Question;
     Go_item('Question.NextQuestion');
End if;


I hope all of you understand my problem.

Regards
0
Comment
Question by:waseemq
8 Comments
 

Expert Comment

by:HuzaifaMerchant
ID: 6231527

The create_record need not be followed by next_record. create_record will navigate to the created record.
0
 
LVL 1

Author Comment

by:waseemq
ID: 6232011
I have tried after removing Next_record but still message is there.

thanks
0
 

Expert Comment

by:attaulla2000
ID: 6232369

Perhaps, I feel you have misplaced your first 'End if' statement.

When checking the condition whether the 'Answer' is null or not, if found it is not null, you should save the response, right?

Consider Changing the Code from:
------------------------------------------
1 If :Responce_detail.AnswerID is not null then
2     Go_item('responce_detail.QuestionID');
3     create_record;
4     Next_record;
5 End if;    
6     :Responce_detail.AnswerID := :Detail.AnswerID;
7     :Responce_detail.QuestionID := :Question.QuestionID;
8     :Responce_detail.Survey_code := :Detail.survey_code;
9     :Responce_detail.Responce_NO := :Master.Responce_NO;
-------------------------------------------

To the follwoing code:
------------------------------------------
1 If :Responce_detail.AnswerID is not null then
2     Go_item('responce_detail.QuestionID');
3     create_record;
4     Next_record;
5     :Responce_detail.AnswerID := :Detail.AnswerID;
6     :Responce_detail.QuestionID := :Question.QuestionID;
7     :Responce_detail.Survey_code := :Detail.survey_code;
8     :Responce_detail.Responce_NO := :Master.Responce_NO;
9 End if;    
-------------------------------------------

I am not sure if this will fix the problem.

--Attaulla
0
 
LVL 1

Expert Comment

by:bkm
ID: 6232991
For Response_Detail, Update Allowed and Insert Allowed should be 'TRUE'

For Master Block also, Update Allowed should be TRUE.

Can you try with this?

If this doesn't work, can you put debug using 'message' and let us know where exactly you are getting (which statement) this error?

Hope this helps!!
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 1

Author Comment

by:waseemq
ID: 6236644
Dear Friends
Thanks for your comments.
After trying all these, the problem is same. One thing is very strange that I receive the message. But after message A record is created and also value transferred successfully. I still looking for the reason for this message. I can supress the message by using
System.Message_level
But its not the proper way. I am trying my best to solve it. I hope so I can do that.

Good luck



0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7036146
Please update and finalize this old, open question. Please:

1) Award points ... if you need Moderator assistance to split points, comment here with details please or advise us in Community Support with a zero point question and this question link.
2) Ask us to delete it if it has no value to you or others
3) Ask for a refund so that we can move it to our PAQ at zero points if it did not help you but may help others.

EXPERT INPUT WITH CLOSING RECOMMENDATIONS IS APPRECIATED IF ASKER DOES NOT RESPOND.

Thanks,

** Mindphaser - Community Support Moderator **

P.S.  Click your Member Profile, choose View Question History to go through all your open and locked questions to update them.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7052493
Lacking timely response from waseemq or contributing experts, but seeing that there is some useful info here, I recommend:
    Refund points and save as a 0-pt PAQ.

DanRollins -- EE database cleanup volunteer
0
 
LVL 6

Accepted Solution

by:
Mindphaser earned 0 total points
ID: 7052500
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now