In this lesson, you configure a Notifier event to define how the Notifier creates push requests, and sends push notifications to devices.
Connect to the consolidated database by creating a new MobiLink project.
To create a new MobiLink projectChoose Start » Programs » SQL Anywhere 12 » Administration Tools » Sybase Central.
From the Tools menu, choose MobiLink 12 » New Project.
In the Name field, type SIS_CarDealer_LP_DBLSN_CONDB_project.
In the Location field, type C:\MLsis, and then click Next.
Check the Add A Consolidated Database To The Project option.
In the Database Display Name field, type SIS_CarDealer_LP_DBLSN_CONDB.
Click Edit. The Connect To A Generic ODBC Database window appears.
In the User ID field, type DBA.
In the Password field, type sql.
In the ODBC Data Source name field, click Browse and select SIS_CarDealer_LP_DBLSN_CONDB.
Click OK, then click Save.
Check the Remember The Password option, and then click Finish.
Click OK.
To create a new NotifierIn the left pane of Sybase Central under MobiLink 12, expand SIS_CarDealer_LP_DBLSN_CONDB_project, Consolidated Databases and then SIS_CarDealer_LP_DBLSN_CONDB - DBA.
Right-click Notification and choose New » Notifier.
In the What Do You Want To Name The New notifier field, type CarDealerNotifier.
Click Finish.
The request_cursor event script detects push requests. Each push request determines what information is sent, and which device should receive the information.
To specify a request_cursor event scriptIn the right pane, select CarDealerNotifier and, from the File menu, choose Properties.
Click the Events tab and choose request_cursor from the Events list.
Type the following SQL script in the provided text field:
SELECT ml_sis_sync_state.remote_id + '.sync' FROM ml_sis_sync_state
WHERE
(
EXISTS (SELECT 1 FROM Dealer
WHERE last_modified >= ml_sis_sync_state.last_download)
AND EXISTS (SELECT poll_key FROM non_sync_request)
) |
Click OK to save the Notifier event.
See also![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |