hostedfiles(
hostedfiles(
HOSTNAME
)

The hostedfiles( function returns a list of open databases associated with a specified host (server).

Parameters

This function has one parameter:

hostname – server name.

Description

This function returns a list of open databases associated with a specified host (server). For example, suppose the current database is connected to a server, and you wanted to disconnect that database from the server, and all other open databases are connected to that server.

    let sharedfiles = hostedfiles(dbinfo("host",""))
    looparray sharedfiles,cr(),sharedfile
        setactivedatabase sharedfile
        dropserver
    endloop

If you have databases connected to different servers, this will only disconnect the databases connected to the same server as the current database. Any databases connected to other databases will keep their connections.

See Also

- connecttoserver -- reconnects the current database to the server (after the dropserver statement has been used).
- dbinfo( -- gets information about a database: what forms it contains, what fields, what flash art pictures, etc.
- disconnectedserver -- takes the current database offline without contacting the server.
- dropserver -- disconnects the current database from the server.
- info("files") -- returns a list of all open database files.

History

Version | Status | Notes
10.2 | New | New in this version.