Creating an update application  Creating a link between the applications

Chapter 5: Creating a Multipage Mobile Application with Transaction Support

Creating a customer list

This section shows how to create the customer list application. You will create another database element using the same sampledb connection, but with a different query. You will also link the customer list to an update application, and establish a listener for the cust_id field.

StepsCreating the customer list

  1. In Mobile Web Studio, select Applications in the left pane, New in the Application Builder Status menu, and click the New button.

  2. In Application Builder, click the down-arrow to the right of Add, and select Database Element.

  3. On the Database Element Definition window, define the database element:

    1. Make sure the Connection Cache option is selected.

    2. In Conn Cache Name, select sampledb from the drop-down list.

    3. In SQL query string, enter this query:

      set rowcount 10
      select c.fname as customer_fname , c.lname as
      customer_lname, si.id, si.prod_id, p.name,
      si.quantity from customer c, sales_order s,
      sales_order_items si, product p where c.id =
      @OP["cust_id"="101"] and s.id = si.id and
      si.prod_id = p.id and s.region =
      '@OP["region"="Western"]'
      set rowcount 0
      
    4. Click Preview to make sure these columns are included: customer_fname, customer_lname, id, prod_id, name, and quantity.

  4. Click Next. The Split window displays.

  5. Click Next. The Define window displays.

  6. Use the Define window to identify record 1 as the header row. In the Define Record Layout section:

  7. Click Next. The parameter definition window displays.

  8. On the parameter definition window, make these modifications (accept the defaults for all others):

  9. Click Next. The Window Preview window displays.

  10. In Element Name, enter customerOrder (no spaces).

  11. Click Next. The Continuous Capture window displays.

  12. In the Continuous Capture window, click Finish.

  13. In Application Builder, click Save to save the changes.

  14. In the Finish window, make this change (otherwise accept the defaults):

    Content tab

  15. Click Finish.

  16. Click OK to confirm.

  17. Click Close to exit the Application Builder.

  18. When you return to the Mobile Web Studio main window, select New from the Application Builder Status menu. The customerOrder application displays in the detail pane.

  19. In Mobile Web Studio, approve the application:

  20. Select Approved from the Application Manager Status menu. You see your newly approved customerOrder application in the detail pane.





Copyright © 2005. Sybase Inc. All rights reserved. Creating a link between the applications

View this book as PDF