Chapter 28 Using Connection Management


Using cached connections in PowerBuilder components

This section briefly summarizes how to create PowerBuilder components that interact with the Jaguar Connection Manager. For detailed instructions on using cached connections in PowerBuilder, see the Application Techniques manual in the PowerBuilder documentation.

To make sure that your PowerBuilder components use a cached connection, first use Jaguar Manager to verify that a matching cache is defined and that the cache is installed in the same server as your component.

In your component, you can obtain cached database connections using standard PowerBuilder techniques for opening a connection. When you open a connection, Jaguar's PowerBuilder dispatcher checks whether a cache exists with matching values for user name, password, and connectivity library. If a matching cache exists, your component receives a connection from the cache. Likewise, when you use standard PowerBuilder techniques to close the connection, Jaguar places it back in the cache for reuse.

For finer control over the use of connection caches, you can set the following DBParm settings before opening a connection:

 


Copyright © 2000 Sybase, Inc. All rights reserved.