ENTER_QUERY Built-in
Description
The behavior of ENTER_QUERY varies depending
on any parameters you supply.
Syntax
PROCEDURE ENTER_QUERY;
PROCEDURE ENTER_QUERY
(keyword_one VARCHAR2);
PROCEDURE ENTER_QUERY
(keyword_two VARCHAR2);
PROCEDURE ENTER_QUERY
(keyword_one VARCHAR2,
keyword_two VARCHAR2);
PROCEDURE ENTER_QUERY
(keyword_one VARCHAR2,
keyword_two VARCHAR2,
locking VARCHAR2);
Built-in Type restricted procedure
Enter Query Mode yes (to redisplay the example record from the last query executed in the block)
Parameters
- no parameters
-
- ENTER_QUERY flushes the current block and puts the form in Enter Query mode.
If there are changes to commit, Oracle Forms prompts the operator to commit
them during the ENTER_QUERY process.
-
- keyword_one
-
- ENTER_QUERY(ALL_RECORDS) performs the same actions as ENTER_QUERY except
that when EXECUTE_QUERY is invoked, Oracle Forms fetches all of the selected
records.
-
- keyword_two
-
- ENTER_QUERY(FOR_UPDATE) performs the same actions as ENTER_QUERY except
that when EXECUTE_QUERY is invoked, Oracle Forms attempts to lock all of
the selected records immediately.
-
- keyword_one/ keyword_two
-
- ENTER_QUERY(ALL_RECORDS, FOR_UPDATE) performs the same actions as ENTER_QUERY
except that when EXECUTE_QUERY is invoked, Oracle Forms attempts to lock
all of the selected records immediately and fetches all of the selected records.
-
- locking
-
- Can be set to NO_WAIT anytime that you use the FOR_UPDATE parameter. When
you use NO_WAIT, Oracle Forms displays a dialog to notify the operator
if a record cannot be reserved for update immediately.
Without the NO_WAIT parameter, Oracle Forms keeps trying to obtain a lock
without letting the operator cancel the process.
Use the NO_WAIT parameter only when running against a data source that supports
this functionality.
ENTER_QUERY Restrictions
- Use the ALL_RECORDS and FOR_UPDATE
parameters with caution. Locking and fetching a large number of rows can result
in long delays due to the many resources that must be acquired to accomplish
the task.
- To enter a value with wildcard characters ('_' or '%'), observe the following:
- For DATE items, enter the value in
a format that is consistent with the item's output format mask. The value
should look like a normal (non-wildcard) value as it would be displayed
on the screen, but with one or more characters replaced by wild-card character(s).
- For non-DATE items (e.g. NUMBER
or CHAR), enter the value in a format
that is consistent with no format mask (again, with one or more
characters replaced by wildcard character(s)).
ENTER_QUERY Examples
/*
** Built-in: ENTER_QUERY
** Example: Go Into Enter-Query mode, and exit the form if
** the user cancels out of enter-query mode.
*/
BEGIN
Enter_Query;
/*
** Check to see if the record status of the first record
** is 'NEW' immediately after returning from enter-query
** mode. It should be 'QUERY' if at least one row was
** returned.
*/
IF :System.Record_Status = 'NEW' THEN
Exit_Form(No_Validate);
END IF;
END;