Keep Connection Open

Description

By default, PocketBuilder opens a database connection the first time you open a painter requiring a connection, and it maintains the connection until you exit.

When you connect to a database in the PocketBuilder development environment without using a database profile, you can set the Keep Connection Open database preference to specify when PocketBuilder should close the database connection. The setting of Keep Connection Open has no effect when you use a database profile to connect in PocketBuilder.

Context

In a PocketBuilder application

You cannot set the Keep Connection Open database preference in a PocketBuilder application script.

In the development environment

In the Database painter, select or clear the Keep Connection Open check box in the Database Preferences dialog box as follows:

Default

The Keep Connection Open check box in the Database Preferences dialog box is selected by default.

Usage

Requirements for using Keep Connection Open To use the Keep Connection Open database preference, both of the following must be true:

What happens If you meet both of these requirements, clearing the Keep Connection Open check box opens a database connection only when you are working in a painter that requires a connection; it closes the connection at other times. This can save you money if you are accessing a database that charges for connect time.