![]() | 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
tableViewNameis 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_SPECIALparameter, you must set the value ofTM_OCCandTM_OCC_COUNTwithsm_tm_isetbefore calling this command. WhenFETCH_SPECIALis specified,TM_OCCis consulted for the start position andTM_OCC_COUNTis consulted for the count.
FETCHfetches 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
CONTINUEinstead ofFETCH, since fetch is performed only for the specified table view.Push buttons and menu selections for the
FETCHcommand can choose to set the class property tocontinue_button. By default,continue_buttonis active in view and update modes.
The
FETCHcommand is available afterSELECTorVIEW, 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_FETCHNo tree traversal, since performed only for the specified table view
Slices:
TM_FETCH,TM_SEL_CHECK
![]()
![]()
![]()
![]()