Programmatic server connection checking

#avFrameworkManager.avCheckConnection method is available in filter and command handler code.

It should be used to check the server connection within a command handler or filter just prior to performing an operation that will use the connection (for example a search or save).

Invoking this method causes the server check function to be called on the server, so it is advisable to consider, and verify by testing, the performance ramifications of how often you invoke it. For example, invoking it in every iteration of a loop that inserts 100 database rows would be ill advised.   

Method: avCheckConnection


Name Usage Class Description Default


Input - Optional

Alpha – max length 32

The server to check (user object name/type of the server)

Current Server


Input – Optional


If the connection is found to have failed, attempt one reconnect



Input – Optional


Issue messages advising the user that the connection has failed

If this is set to FALSE, the ActionOnFail parameter is ignored, and no attempt is made to communicate with the user. 



Input – Optional


Action if the one attempt to reconnect fails. Can be ABORT or NOTIFY/RETRY

  • Abort
  • The user is advised, no further action is taken, and the timer is deactivated.
  • If the user subsequently initiates avCheckConnection, another single attempt to reconnect is made.
  • Notify/Retry
  • Notifies the user, waits for their instruction to try again, and then tries again, if they press OK.
  • On each loop the user can chose OK or Cancel. If they choose Cancel:
  • No further action is taken, the timer is deactivated.
  • If the user subsequently initiates avCheckConnection, the whole notify/retry cycle starts again.


The server value (set in the server properties)


Input - Optional


If this is TRUE and the user has never connected to this server (e.g. they are working offline, or the system has been defined to use the local database), avCheckConnection will return OK.

If this is FALSE and the user has never connected to this server, avCheckConnection will return ER



Output - Optional

Alpha – max length 2

Normally OK (now connected) or ER (not connected). But the connection testing function IIP can be coded to pass back other values