Lesson 7: Creating an Employee List  Lesson 7: Creating an Employee List


Code the open event

Note

Next you code the open event for the w_emplist_tutorial_main window.

  1. Double-click the w_emplist_tutorial_main window (not the DataWindow control) in the Layout view.

  2. Type the following code in the Script view:

    dw_1.SetTransObject(SQLCA)
    
    
    
    dw_1.Retrieve()
    
    Shown is the General tab page of the Properties view. At  top is the Data Object box with the entry d _ cust list.

    The code for the SetTransObject for DataWindow dw_1 associates the SQLCA transaction object that is connected to the database with the DataWindow.

    The code for the Retrieve function for dw_1 makes the DataWindow object associated with dw_1 retrieve the data from the database.

  3. Click the Save button in the PainterBar or select File>Save from the menu bar.





Copyright © 2004. Sybase Inc. All rights reserved. Lesson 7: Creating an Employee List

View this book as PDF