11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

POPULATE_GROUP_WITH_QUERY built-in<br />

Description<br />

Populates a record group with the given query. The record group is cleared and rows that are fetched<br />

replace any existing rows in the record group.<br />

If the SELECT statement fails, <strong>Form</strong> <strong>Builder</strong> returns an ORACLE error number. If the query is<br />

successful, this built-in returns 0 (zero).<br />

You can use this built-in to populate record groups that were created by a call to either:<br />

• the CREATE_GROUP built-in or<br />

• the CREATE_GROUP_FROM_QUERY built-in<br />

When you use this built-in, the indicated query becomes the default query for the group, and will be<br />

executed whenever the POPULATE_GROUP built-in is subsequently called.<br />

Note: Be aware that the POPULATE_GROUP_WITH_QUERY array fetches 20 records at a time. To<br />

improve network performance, you may want to restrict queries, thus limiting network traffic.<br />

Syntax<br />

FUNCTION POPULATE_GROUP_WITH_QUERY<br />

(recordgroup_id RecordGroup,<br />

query VARCHAR2);<br />

FUNCTION POPULATE_GROUP_WITH_QUERY<br />

(recordgroup_name VARCHAR2,<br />

query VARCHAR2);<br />

Built-in Type unrestricted function<br />

Returns NUMBER<br />

Enter Query Mode yes<br />

Parameters<br />

recordgroup_id The unique ID that <strong>Form</strong> <strong>Builder</strong> assigns when it creates the group. The<br />

data type of the ID is RecordGroup.<br />

recordgroup_name The name you gave to the record group when creating it. The data type of<br />

the name is VARCHAR2.<br />

query A valid SELECT statement, enclosed in single quotes. Any columns<br />

retrieved as a result of the query take the data types of the columns in the<br />

table. If you restrict the query to a subset of the columns in the table, then<br />

<strong>Form</strong> <strong>Builder</strong> creates only those columns in the record group. The data<br />

type of the query is VARCHAR2.<br />

POPULATE_GROUP_WITH_QUERY restrictions<br />

• The columns specified in the SELECT statement must match the record group columns in number<br />

and type.<br />

315

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!