DtvLong dal_wdh_upd_sng (flg)

Executes a data query for the search terms set in the fields of the widget mask and separately enters the records found in the first line of the mask.

Input Parameters Significance
char flg control flag:
'I' = initialization
'F' = data fetch
'E' = exit

Output Parameters Significance
none -

Return Code Significance
0 no error
1 no further record found
-1 data base error
-2 wrong control flag
-3 error in the pre_action-trigger for query mode

The function returns a query result similar to dal_wdh_upd_lis, but does not load all records found into local memory but only one at a time, instead.

In order to make sure that the database cursor is correctly opened and closed, this function may never be called in any other way than the following one: One initialization -- any number of data fetches -- one exit. This also applies if only a part of the query results are to be fetched.

Example: C-Code

dal_wdh_upd_sng ('I')
while (!dal_wdh_upd_sng('F'))
...
dal_wdh_upd_sng ('E')

The pre_action-trigger for query mode is called once during initialization and the post_action-trigger for query mode is called after each fetch with the row number 1.