Step 3: save the user object  Step 5: code your application to use the user object

Chapter 16: Using Transaction Objects

Step 4: specify the default global variable type for SQLCA

This procedure assumes that your application uses the default Transaction object SQLCA, but you can also declare and create an instance of your own Transaction object and then write code that calls the user object as a property of your Transaction object. For instructions, see the chapter on working with user objects in the User’s Guide.

In the Application painter, you must specify the user object you defined as the default global variable type for SQLCA. When you execute your application, this tells PocketBuilder to use your standard class user object instead of the built-in system Transaction object.

StepsTo specify the default global variable type for SQLCA:

  1. Click the Open button in the PowerBar, or select File>Open from the menu bar.

  2. In the Open dialog box, select Applications from the Object Type drop-down list. Choose the application where you want to use your new user object and click OK.

    The Application painter workspace displays.

  3. Select the General tab in the Properties view. Click the Additional Properties button.

  4. In the Additional Properties dialog box, click the Variable Types tab to display the Variable Types property page.

  5. In the SQLCA box, specify the name of the standard class user object you defined in Steps 1 through 3.

    Figure 16-2: Specifying a user-defined Transaction object as the default global variable for SQLCA

  6. Click OK or Apply.

    When you execute your application, PocketBuilder will use the specified standard class user object instead of the built-in system object type it inherits from.





Copyright © 2004. Sybase Inc. All rights reserved. Step 5: code your application to use the user object

View this book as PDF