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


History

VersionStatusNotes
10.2NewNew in this version.