Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Form Problem ---You cannot update this record

Posted on 2001-06-27
8
Medium Priority
?
3,764 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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

688 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