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

SAP Sybase SQL Anywhere 16.0 » UltraLite - Database Management and Reference » Tutorial: Building the UltraLite CustDB sample application

 

Lesson 4: Synchronizing the UltraLite database with the consolidated database

In this lesson, you synchronize databases and use either Interactive SQL or Sybase Central to connect to the consolidated database and confirm that your changes were synchronized.

Prérequis

This lesson assumes you have completed all preceding lessons. See Lesson 1: Building and running the CustDB application.

Contexte et remarques

The synchronization process for the CustDB application removes approved orders from your database.

 Task
  1. Synchronize the UltraLite database.

    From the File menu, click Synchronize Database.

  2. Confirm that synchronization took place.

    At the remote database, you can confirm that all required transactions occurred by checking that the order for Awnings R Us is now deleted. Perform this action by browsing the orders to confirm the absence of this entry.

    At the consolidated database, you can also confirm that all required actions occurred by checking data.

    • Confirm that synchronization took place by using Sybase Central.

      1. Click Start » Programs » SQL Anywhere 16 » Administration Tools » Sybase Central.

      2. Click Connections » Connect With SQL Anywhere 16.

      3. In the Action dropdown menu, click Connect With An ODBC Data Source.

      4. Click ODBC Data Source Name.

      5. Click Browse and click SQL Anywhere 16 CustDB.

      6. Click OK.

      7. Click Connect.

      8. Double-click Tables.

      9. Double-click ULOrder.

      10. Click the Data tab and verify that order 5100 is approved, order 5101 is denied, and order 5102 is deleted.

    • Confirm that synchronization took place using Interactive SQL.

      1. Connect to the consolidated database from Interactive SQL.

        1. Click Start » Programs » SQL Anywhere 16 » Administration Tools » Interactive SQL.

        2. In the Action dropdown list, click Connect With An ODBC Data Source.

        3. Click ODBC Data Source Name and click SQL Anywhere 16 CustDB.

      2. To confirm that the approval and denial have been synchronized, execute the following statement:

        SELECT order_id, status
        FROM ULOrder
        WHERE status IS NOT NULL

        The results show that order 5100 is approved and 5101 is denied.

      3. The deleted order has an order_id of 5102. The following query returns no rows, demonstrating that the order has been removed from the system:

        SELECT *
        FROM ULOrder
        WHERE order_id = 5102

Résultat

The approved orders are removed from the database and you confirmed the removal.