Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » MobiLink - Server-Initiated Synchronization » MobiLink Notifier properties » Notifier properties » Notifier polling events


begin_poll property

This is a SQL statement that is executed before each Notifier poll. Typical uses are to detect data change in the database and create push requests that are later fetched with the request_cursor.

The statement is executed in a standalone transaction.

This property is optional. The default is null.

See also

This example creates a push request for a Notifier called Notifier A. It uses a SQL statement that inserts rows into a table called PushRequest. Each row in this table represents a message to send to an address. The WHERE clause determines what push requests are inserted into the PushRequest table.

To use the stored procedure ml_add_property with a SQL Anywhere consolidated database, run the following command:

ml_add_property( 'SIS',
  'Notifier(Notifier A)',
  'INSERT INTO PushRequest
     ( gateway, mluser, subject, content )
        SELECT ''MyGateway'', DISTINCT mluser,
         ''sync'', stream_param
        FROM MLUserExtra, mluser_union, Dealer
        MLUserExtra.mluser =
        AND( push_sync_status = ''waiting for request''
         OR datediff( hour, last_status_change, now() ) > 12 )
        AND ( mluser_union.publication_name is NULL
         OR mluser_union.publication_name =''FullSync'' ) 
         Dealer.last_modified > mluser_union.last_sync_time'