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

SQL Anywhere 12.0.1 » UltraLite - Java Programming » Tutorial: Building an Android application


Lesson 4: Testing your Android application and synchronizing

In this lesson, you use your Android application to update the UltraLite remote database and synchronize the CustDB consolidated database.

 Test your Android application and synchronize
  1. Ensure that the Employee ID field is 50, the Host field is, and the Port field is 80, and then click Save.

    The application automatically synchronizes and a set of customers, products, and orders is downloaded to the application from the CustDB consolidated database.

  2. In the simulator, click Menu » New.

  3. In the Customer field, choose Ace Properties.

  4. In the Product field, choose 4x8 Drywall x100.

  5. In the Quantity field, type 999.

  6. In the Discount field, type 25.

  7. Click OK to add the new order.

  8. Synchronize the application with the CustDB consolidated database.

    In the simulator, click Menu and then click Sync.

  9. Connect to the CustDB consolidated database with Interactive SQL.

    1. Click Start » Programs » SQL Anywhere 12 » Administration Tools » Interactive SQL, or run the following command:

    2. Click ODBC Data Source Name and choose SQL Anywhere 12 CustDB.

    3. Click Connect.

  10. Verify that the synchronization was successful.

    Execute the following SQL statement in Interactive SQL:

    SELECT order_id, disc, quant, notes, status, c.cust_id, 
        cust_name, p.prod_id, prod_name, price 
      FROM ULOrder o, ULCustomer c, ULProduct p 
      WHERE o.cust_id = c.cust_id 
      AND o.prod_id = p.prod_id 
      AND c.cust_name = 'Ace Properties'
      AND p.prod_name = '4x8 Drywall x100';

    Synchronization was successful when an order entry appears in Interactive SQL.

  11. Close the simulator window.