This polling event accepts SQL script and is fired to perform cleanup operations when the need for push request deletion is detected. It accepts the request ID as a parameter and is executed per request ID. Your request_cursor event must contain a request ID column to use the request_delete event. You can reference the request ID using a named parameter or a question mark ( ? ). This event is optional if you have already assigned cleanup operations to another process or event, such as the end_poll event.
The Notifier can use the DELETE statement to remove the following forms of push requests:
Implicitly dropped These push requests appeared previously but did not appear in the current set of requests obtained from the request_cursor event.
Confirmed These are push requests confirmed as delivered.
Expired These push requests expired based on their resend attributes and the current time. Requests without resend attributes are considered expired even if they appear in the next request.
You can use the request_delete event to prevent expired or implicitly dropped requests from being deleted. For example, the CarDealer sample in the %SQLANYSAMP12%\MobiLink\SIS_CarDealer directory uses the request_delete event to set the status field of the PushRequest table to 'processed'.
UPDATE PushRequest SET status='processed' WHERE req_id = ? |
The begin_poll event in the sample uses the last synchronization time to check if remote devices are up-to-date before eliminating processed push requests.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |