checkserverconnection(
SERVER
,
TIMEOUT
)

The checkserverconnection( function checks to see if the specified server is connected.


Parameters

This function has two parameters:

server – name of the server to check. If empty, then use the server associated with the current database

timeout – connection timeout (in seconds). If not specified, the default specified in the Client preference panel will be used.


Description

This function tests the connection to the specified server. It returns true if the connection is ok, false if there is a problem.

if checkserverconnection("Company Server")=false()
    alertsheet "Sorry, server is not connected."
    return
endif

The default connection timeout for this function is normally specified in the Client Preferences panel (usually the default is 30 seconds), but you can add a second parameter to override this. This example will only give the server 5 seconds to respond.

if checkserverconnection("Company Server",5)=false()
    alertsheet "Sorry, server is not connected."
    return
endif

Note: This function tests the connection by sending an “are you alive?” request to the server. If the server responds to this request, the connection is deemed good. Note that the “are you alive?” function is built into Panorama Server, so this is more comprehensive than a simple TCP/IP ping request, it actually verifies that Panorama Server is running and responding to requests.


See Also


History

VersionStatusNotes
10.2UpdatedThe optional connection timeout parameter was added in April 2023.
10.2NewNew in this version.