RetrieveRow  RowFocusChanged

Chapter 8: DataWindow Events

RetrieveStart

Description

Occurs when the retrieval for the DataWindow or DataStore is about to begin.

PocketBuilder event information Event ID: pbm_dwnretrievestart

Returns

Set the return code to affect the outcome of the event:

For information on setting the return code in a particular environment, see “About return values for DataWindow events”.

Usage

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.

Examples

Example 1

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

Example 2 This statement in the RetrieveStart event aborts the retrieval:

RETURN 1

Example 3

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

See also





Copyright © 2004. Sybase Inc. All rights reserved. RowFocusChanged

View this book as PDF