Occurs when the retrieval for the DataWindow or DataStore is about to begin.
PocketBuilder event information Event ID: pbm_dwnretrievestart
Set the return code to affect the outcome of the event:
0 Continue processing
1 Do not perform the retrieval
2 Do not reset the rows and buffers before retrieving data
For information on setting the return code in a particular environment, see “About return values for DataWindow events”.
A return code of 2 prevents previously retrieved data from being cleared, allowing the current retrieval process to append new rows to the old data.
Example 1 This statement in the RetrieveStart event prevents a reset from taking place (rows will be added to the end of the previously retrieved rows):
RETURN 2
Example 2 This statement in the RetrieveStart event aborts the retrieval:
RETURN 1
Example 3 This code allows rows to be retrieved only when a user has an ID between 101 and 200 inclusive (the ID was stored in the instance variable il_id_number when the user started the application); all other IDs cannot retrieve rows:
CHOOSE CASE il_id_number
CASE IS < 100
RETURN 1
CASE 101 to 200
RETURN 0
CASE IS > 200
RETURN 1
END CHOOSE
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |