Bde.DBTables.TSession.ConfigMode
Delphi
property ConfigMode: TConfigMode read GetConfigMode write SetConfigMode;
C++
__property TConfigMode ConfigMode = {read=GetConfigMode, write=SetConfigMode, nodefault};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | Bde.DBTables.pas Bde.DBTables.hpp |
Bde.DBTables | TSession |
Description
Specifies how the Borland Database Engine (BDE) should handle aliases for the session.
Set ConfigMode to specify how the BDE should handle aliases created using the AddAlias or AddStandardAlias methods within the context of a session. ConfigMode also determines which BDE aliases are reported to a session when an application calls the GetAliasNames method.
The default setting for ConfigMode is cmAll, which is a constant that includes all possible set items defined in TConfigModes. The following table summarizes the possible BDE configuration modes that can be set for aliases:
Mode | Meaning |
---|---|
cfmVirtual |
All aliases in the BDE configuration file, the BDE persistent store, and aliases local to the session are available to the session. |
cfmPersistent |
Only aliases in the BDE configuration file, or that are added to the persistent store are available to the session. |
cfmSession |
Only aliases created within this session are available to the session. |
The main purpose of ConfigMode is to enable an application to specify and restrict aliases at the session level.
For backward compatibility with the older TConfigMode, use the constants cmVirtual, cmPersistent, cmSession, and cmAll. The first three correspond to the three TConfigModes values of the same names. The constant cmAll represents a ConfigMode setting of all three. The two command lines below, the first using TConfigModes values and the second using the corresponding constant, are functionally the same.
Session.ConfigMode := [cfmSession];
Session.ConfigMode := cmSession;
Note: Aliases created within a session are not automatically saved to the BDE configuration file. To save an alias to the configuration file, call the SaveConfigFile method.