Solved

Form Problem ---You cannot update this record

Posted on 2001-06-27
8
3,642 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
dbms_crypto.decrypt   errors out 6 60
Sybase and replication server 13 82
Help with Oracle IF statment 5 50
oracle query 4 30
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

734 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