Accessing an IColumns Object

You access an IColumns object by calling the ISearchSchema.Columns property, as in the following example, where objColumns is the name you give to the IColumns object:

Option Explicit 
On Error Resume Next

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

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
...

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

© 1997-1998 Microsoft Corporation. All rights reserved.