FillChunk method: Rowset class
Syntax
FillChunk([[wherestring] [orderbystring] [, bindvalue] . . .], begin_row, end_row)
Description
Use the FillChunk method to read records from the database into successive rows of the rowset starting at begin_row. Unlike Fill, FillChunk doesn’t first flush the rowset. In general, use this method only with rowsets that were created using the CreateRowset function.
When a rowset is selected into, any autoselected child rowsets are also read. The child rowsets are read using a where clause that filters the rows according to the where clause used for the parent rowset, using a subselect.
The records are read from the database tables corresponding to the primary database record of the scroll into that record. The records are selected by the optional wherestring SQL clause, in which the optional bind values are substituted, using the usual bind placeholders (:n).
The actual number of records read into the rowset is an optional return of this method.
Note:
This method does not work with Application Engine state records. Also, you cannot use this method in dynamic views.
When this method executes, unlike the Select method, it does not cause any associated PeopleCode to run as part of reading data into the rowset.
Note:
FillChunk reads only the primary database record. It does not read any related records, nor any subordinate rowset records.
For every record read with the FillChunk method, if the set language is not the base language and the record has related language records, the FillChunk method tries to read the related language record and does related language processing.
The FillChunk method uses a correlation ID of FILLAPPEND for the table it reads. You must use the correlation ID if you want to refer to the rowset table name as part of the wherestring. You receive a runtime error if you use the table name as a column prefix instead of the correlation ID.
Parameters
| Parameter | Description |
|---|---|
|
wherestring |
Specifies an optional SQL WHERE clause to use for selecting records to fill the rowset. This can be a string or a SQL definition. |
|
orderbystring |
Specifies an optional SQL ORDER BY clause. |
|
bindvalue |
Specifies optional bind variables to be used with the WHERE clause. |
|
begin_row |
Specifies the start row location in the target rowset as an integer value. |
|
end_row |
Specifies the end row location in the target rowset as an integer value. |
Returns
(Optional) The number of rows read into the rowset.
Example
&RS = CreateRowset(Record.PSAUTHITEM);
&RS.FillChunk("where FILL.CLASSID = :1 order by FILL.CLASSID, :2, :3 ", "PTMSF_CLIENT_USER", 6, 10);