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.

 

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.

 

Reference:
1. Oracle Forms Online Help
Reference – Built-ins – List of Built-ins – CREATE_GROUP_FROM_QUERY Built-in
http://www.oracle.com/webapps/online-help/forms/10g/state/content/navId.3/navSetId._/vtTopicFile.f1_help%7Cbuilta_c%7Ccreategp%7Ehtml/vtTopicId./

Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone
cmadmin

ABOUT THE AUTHOR

Posted in Archive|

Comment: