Try OpenEdge Now
skip to main content
Programming Interfaces
Data Management : Database Access : Database connections : Connection failures and disruptions : Using CONNECT with NO-ERROR
 
Using CONNECT with NO-ERROR
If you designate a startup procedure with the Startup Procedure (–p) parameter, always use the NOERROR option with the CONNECT statement. If a CONNECT statement fails, the NO–ERROR option suppresses the resulting error condition, allowing the procedure to continue executing. For more information on using the NO–ERROR option, see OpenEdge Development: Error Handling.
After a connection failure, if a subprocedure tries to access the unconnected database, OpenEdge raises a STOP (or break) condition in the calling procedure. Therefore, before you execute any subprocedures that access a database, test whether the database is connected. You can do this with the CONNECTED function.