User Guide
82 Chapter 2: ColdFusion Tags
Before you attempt to delete or purge a collection that is also opened by the K2Server, you must
stop the K2Server. If you do not, some files may be open, and ColdFusion might not complete
the action.
The
list action returns the following information in a result set that contains one row per
collection:
The ColdFusion MX Administrator Verity > Collections page displays the information that is
returned when you use the
list attribute.
If the K2 Server is not running when the
list action is executed, the result set returned contains
K2Server information that was current when the server became unavailable.
To determine whether a collection exists, use code such as the following, to execute a query of
queries:
<cfcollection action="list" name="myCollections" >
<cfquery name="qoq" dbtype="query">
select * from myCollections
where myCollections.name = 'myCollectionName'
</cfquery>
<cfdump var = #qoq#>
To get a result set with values for all the collections that are registered with the ColdFusion and
K2 servers, use code such as the following:
<cfcollection action="list" name="myCollections">
<cfoutput query="myCollections">
#name#<br>
</cfoutput>
To add content to a collection, use cfindex. To search a collection, use cfsearch.
Column Contents
EXTERNAL • Yes: the collection is external
• No: the collection is not external
• Not Found: the collection is registered but is not available in the defined path
LANGUAGE The locale setting of the collection.
This information is not available for K2Server collections.
MAPPED • Yes: the collection is mapped
• No: the collection is not mapped
This information is not available for K2Server collections.
NAME • For a ColdFusion registered collection: its name
• For a K2Server registered collection: its alias, defined in the k2server.ini file.
(ColdFusion saves registered K2Server collection information; it is available
regardless of whether the K2Server is running)
ONLINE • Yes: the collection can be searched
• No: the collection cannot be searched
If EXTERNAL = "Not Found", this value is "No".
PATH Absolute path to the collection. If the collection is mapped or is registered by a
K2Server, the path includes the collection name.
REGISTERED • CF: collection is registered by ColdFusion
• K2: collection is registered by K2Server