Powerbuilder Documentation 7.0

Powerbuilder Documentation 7.0

Printing a job – PB Docs 70

Printing a job PrintOpen must be the first function call in every print job. The PrintOpen function defines a new blank page in memory, specifies that all printing will be done in the printer’s default font, and returns an integer. The integer is the print job number that is used to identify the job in…

Garbage collection – PB Docs 70

Garbage collection The PowerBuilder garbage collection mechanism checks memory automatically for unreferenced and orphaned objects and removes any it finds, thus taking care of most memory leaks. You can use garbage collection to destroy objects instead of explicitly destroying them using the DESTROY statement. This lets you avoid execution-time errors that occur when you destroy…

About the Component Object Model – PB Docs 70

About the Component Object Model The Microsoft Component Object Model (COM) defines a standard way for software components to supply services to each other. Any PowerBuilder custom class user object can be used as a COM object by providing it with an execution environment, a registry entry, and optionally a type library. Clients built with…

Pushing messages to the client – PB Docs 70

Pushing messages to the client Server push Using a technique called server push, the server can send messages to the client. This is particularly useful when the client needs to be notified of the completion of an asynchronous request. Requests are queued The server can make both synchronous and asynchronous calls against client-side objects. The…

Handling communications errors – PB Docs 70

Handling communications errors What the client can do Whenever an error occurs during client/server communications, the client application can trap the error and respond to the situation. In the event of an error, PowerBuilder records information about the error in the built-in Error object. The client application can access the Error object to determine what…

Setting database preferences – PB Docs 70

Setting database preferences How to set The way you set connection-related database preferences in PowerBuilder varies, as summarized in the following table (AutoCommit and Lock are the only database preferences that you can set in a PowerBuilder application script): Database preference Set in development environment by editing Set in PowerBuilder application by editing AutoCommit Database…

About native database interfaces – PB Docs 70

About native database interfaces The native database interfaces provide native connections to many databases and DBMSs. This section describes how the native database interfaces access these databases. The native database interfaces are not supported in PowerBuilder Professional and PowerBuilder Desktop. However, you can upgrade to PowerBuilder Enterprise in order to use the native database interfaces….

Connecting to a database – PB Docs 70

Connecting to a database To establish or change a database connection in PowerBuilder, use a database profile. You can select the database profile for the database you want to access in the Database Profiles dialog box. Using the Database painter to select a database profile You can also select the database profile for the database…

About user-defined functions – PB Docs 70

About user-defined functions The PowerScript language has many built-in functions. But you may find that you need to code the same procedure over and over again. For example, you may need to perform a certain calculation in several places in an application or in different applications. In such a situation, you will want to create…

Building a new menu – PB Docs 70

Building a new menu This section describes how to build menus from scratch. You will use this technique to create menus that aren’t based on existing menus. For how to create a new menu using inheritance, see “Using inheritance to build a menu “. You build a new menu by creating a new object that…