Solved

Form Problem ---You cannot update this record

Posted on 2001-06-27
8
3,705 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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
 
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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Suggested Courses

627 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