Try OpenEdge Now
skip to main content
Managing ABL Applications
ABL and R-code Deployment and Management : Managing Client Access to Databases : Connecting clients to databases : Connection techniques : Connecting from a procedure with the CONNECT statement
Connecting from a procedure with the CONNECT statement
The CONNECT statement allows you to connect to a database from an ABL procedure or from the Procedure Editor.
The following CONNECT statements connect the appldb1 database in single-user mode, the appldb2 database in multi-user mode, and the databases specified in the parameter file, (respectively):
CONNECT appldb1 -1.
CONNECT appldb2.
Connecting with the CONNECT statement is very similar to connecting at startup. Although it is possible to connect to several databases within one CONNECT statement, it is a good idea to connect only one database per CONNECT statement. A connection failure for one database causes a termination of the current CONNECT statement, leaving any subsequent database specified with the CONNECT statement unconnected. For detailed information about the CONNECT statement, see OpenEdge Development: Programming Interfacesq and OpenEdge Development: Programming Interfaces.