Lesson 3: Configure the Notifier

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 project
  1. Choose Start » Programs » SQL Anywhere 12 » Administration Tools » Sybase Central.

  2. From the Tools menu, choose MobiLink 12 » New Project.

  3. In the Name field, type SIS_CarDealer_LP_DBLSN_CONDB_project.

  4. In the Location field, type C:\MLsis, and then click Next.

  5. Check the Add A Consolidated Database To The Project option.

  6. In the Database Display Name field, type SIS_CarDealer_LP_DBLSN_CONDB.

  7. Click Edit. The Connect To A Generic ODBC Database window appears.

  8. In the User ID field, type DBA.

  9. In the Password field, type sql.

  10. In the ODBC Data Source name field, click Browse and select SIS_CarDealer_LP_DBLSN_CONDB.

  11. Click OK, then click Save.

  12. Check the Remember The Password option, and then click Finish.

  13. Click OK.

 To create a new Notifier
  1. In 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.

  2. Right-click Notification and choose New » Notifier.

  3. In the What Do You Want To Name The New notifier field, type CarDealerNotifier.

  4. 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 script
  1. In the right pane, select CarDealerNotifier and, from the File menu, choose Properties.

  2. Click the Events tab and choose request_cursor from the Events list.

  3. 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)
    )
  4. Click OK to save the Notifier event.

 See also