Sponsored

Execute_Query command is used to fetch all the records for current database data block in Oracle Forms, actually its executes query in current data block.

Syntax

EXECUTE_QUERY;
Clears the current block, opens a query, and fetches a number of selected records.

EXECUTE_QUERY (keyword_one VARCHAR2); 
EXECUTE_QUERY(ALL_RECORDS) performs the same actions as EXECUTE_QUERY but Oracle Forms fetches all of the selected records.

EXECUTE_QUERY(keyword_two VARCHAR2); 
EXECUTE_QUERY(ALL_RECORDS, FOR_UPDATE) performs the same actions as EXECUTE_QUERY but it lock all of the selected records immediately and fetches all of the selected records.

EXECUTE_QUERY(keyword_one VARCHAR2, keyword_two VARCHAR2); 

EXECUTE_QUERY(keyword_one VARCHAR2, keyword_two VARCHAR2, locking VARCHAR2);
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. 

Example

[code type="PL/SQL"]BEGIN
Go_Block('yourblock');
Execute_Query;
END;[/code]
Earlier I have given many example to perform query in Oracle Forms and below are the links that you can check for more details.

Define Custom Query Criteria Before Performing Query In Oracle Forms

If Value Exists Then Query Else Create New Record Example Oracle Forms

Sorting Data Block On Query in Oracle Forms

Oracle Forms Execute Query Example using Execute_query

Oracle Forms Recipes eBookDownload

Example is given for Oracle Forms Execute_Query command to populate the current data block. Execute_Query Fetches records.

Post a Comment

V. Kapoor

{picture#https://3.bp.blogspot.com/-q3wCssWUHo8/ViDFfCpPEuI/AAAAAAAAD0M/MHPvgnl3T3U/s1600/authpic.JPG} Vinish Kapoor is a Software Consultant, currently working in a reputed IT company in Noida, India and doing blogging on Oracle Forms, SQL and PLSQL topics. He is an author of an eBook Oracle Forms Recipes, which is available on Google play. {facebook#https://www.facebook.com/foxinfotech2014} {twitter#https://twitter.com/foxinfotech} {google#https://plus.google.com/u/0/+VKapoor/posts}
Fox Infotech. Powered by Blogger.