- Aug 9, 2022
- 23
- 3
- 3
- Customer Identifier
- E114627
There are basically two preconditions for an application to be able to successfully establish a connection to a PostgreSQL database:
These preconditions are deemed critical, because if they are not met, the application will not be able to use or connect to the PostgreSQL server. It is therefore recommended to perform these two steps together, either in the DbeSys() procedure, or in another code location guaranteed to be executed before the first connection attempt is made.
- The PGDBE must be loaded using DbeLoad()
- On a non-developer machine, a client license must be specified for connecting to the PostgreSQL server. *)
These preconditions are deemed critical, because if they are not met, the application will not be able to use or connect to the PostgreSQL server. It is therefore recommended to perform these two steps together, either in the DbeSys() procedure, or in another code location guaranteed to be executed before the first connection attempt is made.
Xbase++:
//
// Load PGDBE and set it up for accepting connections
//
DbeLoad( "PGDBE" )
// Ensure PGDBE is the default DBE, as DbeInfo() always operates on the default DBE
DbeSetDefault( "PGDBE" )
// Set license key and licensee for the DBE and therefore for all future connections
DbeInfo( COMPONENT_DICTIONARY, PGDIC_LICENSE, "licensekey=<your-license-key>;licensee=<your-licensee-name>;")
Last edited: