Solved

what is PLSQL code for cancel 'enter_query' mode

Posted on 2003-11-11
12
1,844 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
 
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 15

Accepted Solution

by:
andrewst earned 50 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Migrating an SQL 2008 database to Oracle 12c 3 88
query in Oracle forms Builder 2 41
Wrap Oraccle SQL*Plus executable Command 4 66
Export table into csv file in oracle 10 41
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now