Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

what is PLSQL code for cancel 'enter_query' mode

Posted on 2003-11-11
12
Medium Priority
?
2,186 Views
Last Modified: 2007-12-19
For the menu command Query, Enter we have the PL/SQL command Enter_Query.
For the menu command Query, Execute we have the PL/SQL command Execute_Query;
For the menu command Query, Cancel we have the PL/SQL command ????????
0
Comment
Question by:Alta_
12 Comments
 
LVL 15

Expert Comment

by:andrewst
ID: 9721520
It is:

IF :SYSTEM.MODE = 'ENTER-QUERY' THEN
  EXIT_FORM;
END IF;
0
 

Author Comment

by:Alta_
ID: 9721570
I tried this and didnt work.
I could exit the enter_query mode only by pressing CTRL+Q..or the 'Cancel query' button...
But I'm interested to do it with PL SQL code.
Maybe there is a way to simulate pressing the
'CTRL+Q' keys?
0
 
LVL 13

Expert Comment

by:anand_2000v
ID: 9721640
I think a clear_form(no_validate) will help.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 15

Expert Comment

by:andrewst
ID: 9721653
How come it didn't work?  It does when I do it.
0
 
LVL 22

Expert Comment

by:Helena Marková
ID: 9721700
andrewst answer MUST work ...
0
 

Author Comment

by:Alta_
ID: 9721718
Simply it didn't work.
I have a form with a master-detail block...and I want to make some control buttons.

I made a "search" button and want to fill one item with some value (in order to do 'execute-query' after this...to filter some records). I wrote the trigger 'when-button-pressed'  for this button with this code:
enter_query;

I want to make a "cancel" button to exit this
'enter_query' mode...but I cant.
Only button from standard menu work (Cancel Query) or CTRL+Q from kbd.



0
 
LVL 15

Accepted Solution

by:
andrewst earned 200 total points
ID: 9721796
That's what I did just now before I gave my answer:

1) Created a new form
2) Created a simple base table block based on table DEPT
3) Created a button (in block DEPT as it happens) with the following code:

IF :SYSTEM.MODE = 'ENTER-QUERY' THEN
  EXIT_FORM;
ELSE
  MESSAGE('Not currently in enter-query mode' );
END IF;

I then ran the form and did these tests:
1) Pressed my cancel button immediately: got message 'Not currently in enter-query mode'
2) Pressed Enter Query toolbar button
3) Pressed my cancel button again: got message 'FRM-40353:  Query cancelled'

I can only imagine you have made a mistake in your attempt to implement this somehow.

0
 

Author Comment

by:Alta_
ID: 9721861
I did aprox. the same with the single table...and I succeded.

But when I use a master-detail block..so a parent table and a child table...things dont work...never  got message 'FRM-40353:  Query cancelled' ....only 'press F8 for execute and CTRL_q for cancel.'

So I think the problem is from this relation?
Could you try for a master-detail block?


0
 

Author Comment

by:Alta_
ID: 9721874
I forgot to say I have 3 blocks:
-one for master(parent)
-one for detail (child)
-one for control buttons
0
 

Author Comment

by:Alta_
ID: 9721909
wow...
If I move the control buttons to master block data (parent)...it works ...as you said.

What to do then...to make work.. if this buttons are in the different block (not data block) ?
0
 
LVL 15

Expert Comment

by:andrewst
ID: 9721943
In the button properties, set Mouse Navigate = No, then it should be OK
0
 

Author Comment

by:Alta_
ID: 9722019
Yes :)
its works now!!
thanks a lot!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Via a live example, show how to take different types of Oracle backups using RMAN.

824 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