MACROMEDIA COLDFUSION 5 - INSTALING AND CONFIGURING SERVER Spécifications Page 37

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 42
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 36
Tag and function examples 29
Branch = "HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\
Collections"
Entry = "RootDirectory"
Type = "STRING"
Variable = "CFRootDir">
<CFIF Server.OS.Name IS NOT "UNIX">
<CFSET CollectionPath = "#CFRootDir#\Verity\Collections\">
<CFELSE>
<CFSET CollectionPath = "#CFRootDir#/verity/collections/">
</CFIF>
<CFCOLLECTION Action = "CREATE"
Collection = "#request.datasource#"
Path = "#CollectionPath#"
Language = "english">
</CFIF>
Compatible example
In ColdFusion MX, you cannot retrieve a list of Verity collections that are registered by
ColdFusion or the K2 Server using the registry. Instead, use
cfcollection with
action=“list", perform a Query of Queries on the queryResult that is specified in the
name attribute of cfcollection, and use cfdump to display the collections. Following is
sample code to accomplish these tasks:
<cfcollection action = "list" name = "verity" >
<cfoutput>List of all known verity collections.<br><br></cfoutput>
<CFDUMP var = "#verity#">
<br>
<cfoutput>Searching for a specific collection by name.<br><br></cfoutput>
<cfquery name = "qoq" dbtype = "query">
select * from verity where verity.name = 'test_db_neo'
</cfquery>
<br>
<CFDUMP var = "#qoq#">
This returns a table of every collection that is registered by ColdFusion or the K2 Server.
The table has the following columns:
Name The name of the CF registered collection or the alias collection name for the
K2 Server registered collection. ColdFusion MX saves the K2 Server registered
collection information, so it is available even when the K2 Server is not running.
Registered “CF” if the collection is registered by ColdFusion, or “K2” if the
collection is registered by the K2 Server.
Path The path to the collection. If the collection is external or registered by the K2
Server, the path includes the collection name.
Mapped (CF collections only) “YES” or “NO” if the collection is mapped or not.
External (CF collections only) “YES” or “NO” if the collection is external or not.
Language (CF collections only) The language used by the collection.
Online (CF collections only) “YES” or “NO” if the collection is available for
searching or not.
Vue de la page 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42

Commentaires sur ces manuels

Pas de commentaire