Home » Developer & Programmer » Forms » I can't update my master-detail
I can't update my master-detail [message #215735] Tue, 23 January 2007 12:58 Go to next message
Smith_X
Messages: 56
Registered: January 2007
Member
hello.. This question sound stupid but I need a lot of aspirin for now...

I design PR from which allow user to create a new PR (master-detail) and it's work well. Then, I create another PR form to allow user to "APPROVE" the pr. Due to I do not know how to limit user authenticated in item-level, so I do in form level instead.

In PR-Approve form, I have a LOV button for user to list the PR which have status "not approve" but when I try to click the LOV and start EXECUTE QUERY (in lov button) the form want me to make a change first. This problem came from I start in edit mode instead of query mode. So, I change my method to use "CURSOR" instead of EXECUTE_QUERY but the problem is I do not know how to set Oracle Form to update my data instead of insert the new one. Then, now I have problem about I try to insert data with the same Primary Key.

Actually, I want master and detail are executed query at the same time. I just want to update the document status. Maybe I do not permit user to add new data in this form, too. Could you please comment me what I should do?

(I also did the master-detail by Wizards and I think the relation is still function.)

Regards,
Re: I can't update my master-detail [message #215794 is a reply to message #215735] Tue, 23 January 2007 22:53 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Please post code that you have in LOV button.

I don't see why you are doing an 'execute_query' in the trigger.

David

[Updated on: Tue, 23 January 2007 22:53]

Report message to a moderator

Re: I can't update my master-detail [message #215817 is a reply to message #215735] Wed, 24 January 2007 00:20 Go to previous messageGo to next message
Smith_X
Messages: 56
Registered: January 2007
Member
Code in when-button-press trigger
DECLARE
	V_SUP BOOLEAN;
BEGIN
	V_SUP := SHOW_LOV('LOV_PRNO');
	--clear_block;
	EXECUTE_QUERY(no_validate);


The problem that I face now is..
When I press LOV button. Oracle form ask me to save the change. I do not want this dialog. So, I use no_validate to turn the dialog off. Now, I can show master-detail data in my form but there is another priblem.

If I press LOV button again, the form pop-up alert about it cannot use records and already tried for 2 times. (Pop-up appear in local language, I'm not sure what's the original english one, sorry)

Now I struck with this problem. I do switch to use cursor but I think those cursor will use for insert new records of detail more than just change the status of master.

Please advice me.
Re: I can't update my master-detail [message #216073 is a reply to message #215817] Wed, 24 January 2007 22:29 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Try:
DECLARE
	V_SUP BOOLEAN;
BEGIN
  enter_query;
	V_SUP := SHOW_LOV('LOV_PRNO');
	--clear_block;
	EXECUTE_QUERY(no_validate);

David
Re: I can't update my master-detail [message #216135 is a reply to message #215735] Thu, 25 January 2007 03:57 Go to previous messageGo to next message
Smith_X
Messages: 56
Registered: January 2007
Member
Thanks very much for your reply, David.

Now I try your code and many of other mix of your code that I can..

I have another problem for now..

1. when I press the lov button. it'll lead me to enter_query mode but do not show the pop-up love at once. This issue is strange.

2. when I press the button again, it's pop-up the lov windows but when I choose the PRNO, it's pop-up the lov windows again (look like it's pop-up twice)

3. no matter how do I choose the value in lov windows, the return value will be the first value of PR number only. I do force validate on list in text item property, too.

Anybody had been ever face these kind of problems before please?
Re: I can't update my master-detail [message #216487 is a reply to message #216135] Sun, 28 January 2007 22:17 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Verify that you have the trigger set so that it will 'Fire in Enter-Query Mode'.

David
Previous Topic: please response to me
Next Topic: 10G-Form: How to add Email-id to the To: field in the Outlook?
Goto Forum:
  


Current Time: Sat Dec 10 16:31:48 CST 2016

Total time taken to generate the page: 0.10313 seconds