Previous in Contents Next in Contents

Accessing an ISearchSchema Interface Object

You access an ISearchSchema interface object by calling the IBuildCatalog.Schema property, as in the following example, where objSearchSchema is the name you give to the ISearchSchema interface object:

Option Explicit 
On Error Resume Next 

Dim objSearchAdmin, objBuildCatalog, objSearchSchema 

Set objSearchAdmin = CreateObject("Search.SearchAdmin.1") 

For Each objBuildCatalog in objSearchAdmin.BuildServer.BuildCatalogs
  Wscript.Echo objBuildCatalog.Name & "'s schema has " _
    & objBuildCatalog.Schema.Columns.Count & " columns and " _
    & objBuildCatalog.Schema.StopLists.Count & " stop lists."
Next

'Release objects 
Set objBuildCatalog  = Nothing 
Set objSearchAdmin  = Nothing 
 

© 1997-2000 Microsoft Corporation. All rights reserved.