Home » Developer & Programmer » Forms » Don't "want to save the change ?"
icon11.gif  Don't "want to save the change ?" [message #216470] Sun, 28 January 2007 13:38 Go to next message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

hi all,
i have a small problem can some-one help me.
i have oracle 9i database with form 6i .
>> open developer (form 6i).

>>conn scott/tiger

>>create a data block of DEPT table.

>> create a control-block.place a button(look) in it.

>>write a program unit.simple as.

PROCEDURE look IS
BEGIN
select dname,loc into:dname,:loc from dept where deptno=:deptno;

END;


call it through 'when button pressed'trigger of button.

>>run the form ,and enter '20' in deptno text-field .then press the button.ok

i want to only display the informatio about the deptno(given) not to save it.
but when i close my form i got an alert 'Do you want to save these changes that u have made?'.


can some one help me how i can display these values,and how can i remove/disable the above alert. (the alert will never display) .

please help me.
regards.
  • Attachment: look.fmb
    (Size: 48.00KB, Downloaded 986 times)
Re: Don't "want to save the change ?" [message #216483 is a reply to message #216470] Sun, 28 January 2007 19:58 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Instead of that code just write execute_query;
Re: Don't "want to save the change ?" [message #216761 is a reply to message #216483] Tue, 30 January 2007 05:03 Go to previous messageGo to next message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

would you please helpme about the point where i write simple "execute_query'?
thanx in advance
Re: Don't "want to save the change ?" [message #216774 is a reply to message #216761] Tue, 30 January 2007 05:52 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Do not create a control block - data block is enough. Enter query mode, enter 20 into the 'deptno' column and press Execute Query.

If you insist on control block, create a DEFAULT WHERE condition for the data block and make sure it "inherits" control block's department number. WHEN-BUTTON-PRESSED trigger should have only two lines:
GO_BLOCK('dept');
EXECUTE_QUERY;
Re: Don't "want to save the change ?" [message #216870 is a reply to message #216774] Tue, 30 January 2007 14:11 Go to previous message
lunate
Messages: 74
Registered: October 2006
Location: Pakistan
Member

ok i will try it.
thanx for ur time and replies.

[Updated on: Tue, 30 January 2007 14:14]

Report message to a moderator

Previous Topic: 10G-form: How to open 2nd form based on the queried result in 1st form?
Next Topic: Alert box setting size and position
Goto Forum:
  


Current Time: Sat Feb 08 19:08:27 CST 2025