Connect to a database
- Last Updated: February 4, 2026
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
The power of ABL is in the simplicity of working with databases. During application development and when running your application, it must be connected to a database.
If you are setting up your own development environment, you need a sample database to work with. If your application database is not yet available, there are sample databases that you can copy and use. For more information see Create a database with the PRODB utility.
Before connecting an application to a database you may have to start the database server. For more information on starting a database server see Starting up and shutting down a database server. You can also connect to a database without starting a database server by running in single-user mode. In this mode only one user can access the database.
CONNECTstatement — The CONNECT statement is a simple, programmatic mechanism to establish a connection to one or more databases from within an ABL procedure or class. This step must be done in a file before any files can use the database.The following code connects to a sample database in the OpenEdge installation directory in single-user mode:CONNECT WRK/db/Sports2020 -1.The following code connects to a database on the specified host and port:CONNECT WRK/db/Sports2020 -H dbserver -S 1900 NO-ERROR.- Startup parameters — You can use startup parameters to establish
a connection to one or more databases. In the following example, the
-dbstartup parameter is used to specify the name of the database.
For more information see Client startup command syntax.prowin -db sports2020 -1