Automatic database reconnect demo and code
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
In this video, you learn about a feature which allows ABL clients to automatically connect to an alternate database, if the connection to the primary database fails. This mechanism helps ensure the continuous operation of the client application.
Demo code
The following code is used in the demo:
my.pf:
|
dbconnect.p:
|
getcustomers.p:
|
autoreconnect.pf:
|
Note: The only difference between autoreconnect.pf and my.pf is the inclusion of
the
-autoreconnect startup parameter. This parameter enables your
procedure to attempt reconnection to all databases listed in the parameter file if a
disconnection occurs. Without -autoreconnect, the procedure would
simply terminate. You would use this parameter file instead of
my.pf.