Users Guide

Appeon PowerBuilder® 2021


DOCUMENT ID: DC00844-01-1900-01

LAST REVISED: September 16, 2021

Copyright © Appeon. All rights reserved.

This publication pertains to Appeon software and to any subsequent release until otherwise indicated in new editions or technical notes. Information in this document is subject to change without notice. The software described herein is furnished under a license agreement, and it may be used or copied only in accordance with the terms of that agreement.

Upgrades are provided only at regularly scheduled software release dates. No part of this publication may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual, optical, or otherwise, without the prior written permission of Appeon Inc.

Appeon and other Appeon products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Appeon Inc.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP and SAP affiliate company.

Java and all Java-based marks are trademarks or registered trademarks of Oracle and/or its affiliates in the U.S. and other countries.

Unicode and the Unicode Logo are registered trademarks of Unicode, Inc.

All other company and product names mentioned may be trademarks of the respective companies with which they are associated.

Use, duplication, or disclosure by the government is subject to the restrictions set forth in subparagraph (c)(ii) of DFARS 52.227-7013 for the DOD and as set forth in FAR 52.227-19(a)-(d) for civilian agencies.

Appeon Inc., 1/F, Shell Industrial Building, 12 Lee Chung Street, Chai Wan District, Hong Kong.

Table of Contents

The PowerBuilder Environment
Working with PowerBuilder
About PowerBuilder
Concepts and terms
The PowerBuilder environment
Creating and opening workspaces
Using wizards
Creating a target
Target types
Managing workspaces
Building workspaces
Working with tools
Using online help
Building an application
Customizing PowerBuilder
Starting PowerBuilder with an open workspace
Changing default layouts
Using toolbars
Customizing keyboard shortcuts
Changing fonts
Defining colors
How the PowerBuilder environment is managed
Using Source Control
About source control systems
Using SVN source control system
Using Git source control system
Using source control systems via SCC API
Working with Targets
Working with Targets
About targets
Working in painters
About the Application painter
Specifying application properties
Writing application-level scripts
Specifying target properties
Looking at an application's structure
Working with objects
Using the Source editor
Working with Libraries
About libraries
Opening the Library painter
About the Library painter
Working with libraries
Searching targets, libraries, and objects
Optimizing libraries
Regenerating library entries
Rebuilding workspaces and targets
Upgrading targets
Exporting and importing entries
Creating runtime libraries
Creating reports on library contents
Coding Fundamentals
Writing Scripts
About the Script view
Opening Script views
Modifying Script view properties
Editing scripts
Using AutoScript
Getting context-sensitive Help
Compiling the script
Declaring variables and external functions
Working with User-Defined Functions
About user-defined functions
Defining user-defined functions
Modifying user-defined functions
Using your functions
Working with User Events
About user events
Defining user events
Using a user event
Working with Structures
About structures
Defining structures
Modifying structures
Using structures
Working with Windows
Working with Windows
About windows
Types of windows
About the Window painter
Building a new window
Viewing your work
Writing scripts in windows
Running a window
Using inheritance to build a window
Working with Controls
About controls
Inserting controls in a window
Selecting controls
Defining a control's properties
Naming controls
Changing text
Moving and resizing controls
Copying controls
Defining the tab order
Defining accelerator keys
Specifying accessibility of controls
Choosing colors
Using the 3D look
Using the individual controls
Understanding Inheritance
About inheritance
Creating new objects using inheritance
The inheritance hierarchy
Browsing the class hierarchy
Working with inherited objects
Using inherited scripts
Working with RibbonBar
Introduction to RibbonBar items
Creating a RibbonBar using RibbonBar Builder
Accessing the RibbonBar items in the hierarchy
Tutorial: How to Replace an Application Menu with a RibbonBar
Working with WebBrowser
What can WebBrowser support?
Configuring WebBrowser
Defining user events for WebBrowser
Packaging WebBrowser
WebBrowser control vs. Microsoft Web Browser OLE control
Working with Menus and Toolbars
Menus and menu items
Using the Menu painter
Building a new menu
Defining the appearance and behavior of menu items
Providing toolbars
Writing scripts for menu items
Using inheritance to build a menu
Using menus in your applications
Working with User Objects
About user objects
About the User Object painter
Building a new user object
Using inheritance to build user objects
Using user objects
Communicating between a window and a user object
Working with Databases
Managing the Database
Working with database components
Managing databases
Using the Database painter
Creating and deleting a SQL Anywhere database
Working with tables
Working with keys
Working with indexes
Working with database views
Manipulating data
Creating and executing SQL statements
Controlling access to the current database
Using the ASA MobiLink synchronization wizard
Managing MobiLink synchronization on the server
Working with Data Pipelines
About data pipelines
Creating a data pipeline
Modifying the data pipeline definition
Correcting pipeline errors
Saving a pipeline
Using an existing pipeline
Pipeline examples
Working with DataWindows
Defining DataWindow Objects
About DataWindow objects
Choosing a presentation style
Building a DataWindow object
Selecting a data source
Using Quick Select
Using SQL Select
Using Query
Using External
Using Stored Procedure
Using a Web service data source (Obsolete)
Using the OData Service (Obsolete)
Choosing DataWindow object-wide options
Generating and saving a DataWindow object
Defining queries
What's next
Enhancing DataWindow Objects
Working in the DataWindow painter
Using the Preview view of a DataWindow object
Saving data in an external file
Modifying general DataWindow object properties
Storing data in a DataWindow object using the Data view
Retrieving data
Working with Controls in DataWindow Objects
Adding controls to a DataWindow object
Reorganizing controls in a DataWindow object
Positioning controls in a DataWindow object
Rotating controls in a DataWindow object
Controlling Updates in DataWindow objects
About controlling updates
Specifying the table to update
Specifying the unique key columns
Specifying an identity column
Specifying updatable columns
Specifying the WHERE clause for update/delete
Specifying update when key is modified
Using stored procedures to update the database
Using a Web service to update the database (Obsolete)
Displaying and Validating Data
About displaying and validating data
About display formats
Working with display formats
Defining display formats
About edit styles
Working with edit styles
Defining edit styles
Defining a code table
About validation rules
Working with validation rules
Defining validation rules
How to maintain extended attributes
Filtering, Sorting, and Grouping Rows
Filtering rows
Sorting rows
Grouping rows
Highlighting Information in DataWindow Objects
Highlighting information
Modifying properties conditionally at runtime
Supplying property values
Specifying colors
Using Nested Reports
About nested reports
Creating a report using the Composite presentation style
Placing a nested report in another report
Working with nested reports
Working with Graphs
About graphs
Using graphs in DataWindow objects
Using the Graph presentation style
Defining a graph's properties
Using graphs in windows
Working with Crosstabs
About crosstabs
Creating crosstabs
Associating data with a crosstab
Previewing crosstabs
Enhancing crosstabs
Working with TreeViews
TreeView presentation style
Creating a new TreeView DataWindow
Adding and deleting TreeView levels
Selecting a tree node and navigating the tree
Sorting rows in a TreeView DataWindow
TreeView DataWindow Design view
Setting properties for the TreeView DataWindow
TreeView DataWindow examples
Exporting and Importing XML Data
About XML
XML support in the DataWindow painter
The Export/Import Template view for XML
Editing XML templates
Exporting to XML
Importing XML
Working with Rich Text
About rich text
Using the RichText presentation style
Using the RichTextEdit control
Formatting keys and toolbars
Using OLE in a DataWindow Object
About using OLE in DataWindow objects
OLE objects and the OLE presentation style
Using OLE columns in a DataWindow object
Running Your Application
Debugging and Running Applications
Overview of debugging and running applications
Debugging an application
Running an application
Tracing and Profiling Applications
About tracing and profiling an application
Collecting trace information
Analyzing trace information using profiling tools
Analyzing trace information programmatically
Generating a trace file without timing information
Creating Executables and Components
About building PowerBuilder targets
Using the Project painter
Using dynamic libraries
Attaching or embedding manifest files
Distributing resources
Working with an Application project
Working with a PowerClient project
Working with a PowerServer project
Building proxies and .NET targets
Appendix A. The Extended Attribute System Tables
About the extended attribute system tables
The extended attribute system tables
Edit style types for the PBCatEdt table
Appendix B. PowerBuilder Compiler
Installing PowerBuilder Compiler
About PBC210.exe
Appendix C. The OrcaScript Language
About OrcaScript
OrcaScript Commands
Usage notes for OrcaScript commands and parameters
Usage notes for OrcaScript commands with SVN/Git