info("serverconnection")

The info(“serverconnection”) function returns true if the currently active database successfully connected to the server when it opened.


Description

The info(“serverconnection”) function returns true if the currently active database successfully connected to the server when it opened. If the database failed to connect to the server (perhaps the server is unavailable at that moment), or if it is not a shared database, it returns false.

IMPORTANT: This function does not actually verify that there is a working connection between this computer and the server, or that the server itself is working. If you want to do that, use the info(“serverconnectionstatus”) function.

This example displays a message and stops if the current database isn’t currently connected.

if info("serverconnection")=false()
    message "Database is open but not connected to the server."
    return
endif
...
... more code here
...

Note: Another way to find out if a database is currently connected is to use the dbinfo( function. This function can find out if any open database is connected, not just the current database.

if dbinfo("connected","Checkbook")=false()
    message "Checkbook is not connected to the server."
    return
endif

See Also


History

VersionStatusNotes
10.2No ChangeCarried over from Panorama 6.0