info(“serverconnection”)
info(“serverconnection”)

The info(“serverconnection”) function returns true if the currently active database is connected to the server.

Description

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

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")
        message "Checkbook is not connected to the server."
        return
    endif

See Also

- connecttoserver -- reconnects the current database to the server (after the dropserver statment has been used).
- dropserver -- disconnects the current database from the server.
- serverdatabasename( -- returns the server database name associated with a shared database.
- servername( -- returns the name of the server associated with a shared database.
- sharedusers( -- returns a list of users that are currently using the specified database.

History

Version | Status | Notes
10.2 | No Change | Carried over from Panorama 6.0