Programming Guide |
Fetches the next set of data from the database
int sm_tm_command ("FETCH [tableViewName
[ { FETCH_SIMPLE | FETCH_SPECIAL } ] ]");
tableViewName
- The name of a table view in the current transaction. The table view must either be a server view or be the server view to which the desired table view belongs. This parameter is case sensitive. If
tableViewName
is not specified, the command is applied to the root table view.FETCH_SIMPLE
- Start the fetch with the first occurrence. The number of rows fetched depends on the size of the arrays. This is the default parameter if none is specified, or if no table view name is specified.
FETCH_SPECIAL
- Allows you to override the occurrence number and the size of the array. To use the
FETCH_SPECIAL
parameter, you must set the value ofTM_OCC
andTM_OCC_COUNT
withsm_tm_iset
before calling this command. WhenFETCH_SPECIAL
is specified,TM_OCC
is consulted for the start position andTM_OCC_COUNT
is consulted for the count.
FETCH
fetches the next set of rows for the specified table view.If your screen has multiple table views and you want to fetch data for all of them at the same time, use
CONTINUE
instead ofFETCH
, since fetch is performed only for the specified table view.Push buttons and menu selections for the
FETCH
command can choose to set the class property tocontinue_button
. By default,continue_button
is active in view and update modes.
The
FETCH
command is available afterSELECT
orVIEW
, both of which generate a database query and display the first set of query results.
Table 8-18 Request events for FETCH
Request Traversal Typical Processing
TM_FETCH
No tree traversal, since performed only for the specified table view
Slices:
TM_FETCH
,TM_SEL_CHECK