Working with Record Groups

Questions derived from the 1Z0-141 – Oracle Forms: Build Internet Applications Oracle Self-Test Software Practice Test.


Objective: Working with Record Groups
SubObjective: Define query record groups programmatically and nonprogrammatically


Item Number: 1Z0-141.29.5.1
Single Answer, Multiple Choice


Examine this code:


BEGIN
CREATE_GROUP_FROM_QUERY (‘employee_rg’, ‘SELECT id,first_name,last_name,sal FROM employee’);
END;


Why do you receive an error during compilation of this code?



  1. The record group has not been populated.
  2. The value for the SCOPE parameter is missing.
  3. The syntax used to invoke CREATE_GROUP_FROM_QUERY is invalid.
  4. The record group must be created first using the CREATE_GROUP built-in.

Answer:
C. The syntax used to invoke CREATE_GROUP_FROM_QUERY is invalid.


Tutorial:
The syntax used to invoke CREATE_GROUP_FROM_QUERY is invalid. The CREATE_GROUP_FROM_QUERY built-in is a function and must be invoked as part of an expression. For example:


DECLARE
rg_id RecordGroup;
BEGIN


rg_id := CREATE_GROUP_FROM_QUERY (‘employee_rg’, ‘SELECT id,first_name,last_name,sal FROM employee’);


END;


The record group not being populated would not cause a compilation error. The record group would be populated after it was created.


The value for the SCOPE parameter being missing would not cause a compilation error. The SCOPE parameter defaults to FORM_SCOPE, which specifies that the record group can be used only within the current form. You only need to specify the SCOPE parameter if you want the record group to be global. If you specify a SCOPE parameter of GLOBAL_SCOPE, the record group will be available to all the forms in your application.




cmadmin

ABOUT THE AUTHOR

Posted in Uncategorized|

Comment:

Powered by WebDesk