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-220.127.116.11
Single Answer, Multiple Choice
Examine this code:
CREATE_GROUP_FROM_QUERY (‘employee_rg’, ‘SELECT id,first_name,last_name,sal FROM employee’);
Why do you receive an error during compilation of this code?
- The record group has not been populated.
- The value for the SCOPE parameter is missing.
- The syntax used to invoke CREATE_GROUP_FROM_QUERY is invalid.
- The record group must be created first using the CREATE_GROUP built-in.
C. The syntax used to invoke CREATE_GROUP_FROM_QUERY is invalid.
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:
rg_id := CREATE_GROUP_FROM_QUERY (‘employee_rg’, ‘SELECT id,first_name,last_name,sal FROM employee’);
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.
The record group not being created first using the CREATE_GROUP built-in would not be the reason for a compilation error. The CREATE_GROUP built-in would be used to create a nonquery record group.
1. Oracle Forms Online Help
Reference – Built-ins – List of Built-ins – CREATE_GROUP_FROM_QUERY Built-in