Columns Property

This read-only property specifies a collection of columns (IColumns interface) of information about the file.

Syntax

ISearchSchema.Columns

Remarks

See the Columns and Column interface methods for information on how to add and modify column definitions.

Example

The following example displays the names of the columns (document properties that are indexed or retrieved) for the KMSampleCatalog1 catalog definition.

Option Explicit 
On Error Resume Next

Dim objSearchAdmin, objBuildServer, objCatalogs, objCatalog, objSchema, objColumns, objColumn

Set objSearchAdmin  = CreateObject("Search.SearchAdmin.1")
Set objBuildServer  = objSearchAdmin.BuildServer
Set objCatalogs  = objBuildServer.BuildCatalogs 
Set objCatalog   = objCatalogs("KMSampleCatalog1")
Set objSchema    = objCatalog.objSchema
Set objColumns   = objSchema.objColumns

For Each objColumn in objColumns
  Wscript.Echo "Document property " & objColumn.Name & " is: "
  If objColumn.Index Then
     Wscript.Echo "  indexed."
   Else
     Wscript.Echo "  not indexed."
   End If

   If objColumn.Retrieve Then
     Wscript.Echo "  retrieved."
   Else
     Wscript.Echo "  not retrieved."
   End If
   Wscript.Echo ""
Next

'Release objects 
Set objColumn    = Nothing 
Set objColumns   = Nothing 
Set objSchema    = Nothing 
Set objCatalog   = Nothing 
Set objCatalogs  = Nothing 
Set objBuildServer  = Nothing 
Set objSearchAdmin  = Nothing 
 

See Also

IColumns, Stoplists


© 1997-1998 Microsoft Corporation. All rights reserved.