Previous in Contents Next in Contents

Add Method

This method adds a column to the collection of columns (IColumn interfaces).

Syntax

IColumns.Add(Name, Description, Type, PropGuid, PropPid, Index, Retrieve, Length)

Parameters

Name

The name of the column. Search sets the Name property of the column to this value.

Description

A textual description of the column. Search sets the Description property of the column to this value.

Type

The data type of the column. Search sets the Type property of the column to this value. See the Type property for information on the types.

PropGuid

The property set GUID. Search sets the PropGuid property of the column to this value.

PropGuid and PropPid uniquely identify a column for indexing, searching, and retrieving.

PropPid

The property ID. Search sets the PropPid property of the column to this value.

Index

If True, Search indexes the information in this column. Search sets the Index property of the column to this value.

Retrieve

If True, Search can retrieve the information in this column; if False, Search cannot retrieve the information in this column. Search sets the Retrieve property of the column to this value.

Length

Length is reserved and should always be set to zero.

Remarks

Search does not validate the values of this method's parameters until you call the ISearchSchema.Save method.

You should check the Err.Number property after both the Add and the ISearchSchema.Save methods to ensure that the column was added successfully.

Example

See Creating_and_Accessing IColumn Interface Objects.

See Also

Clear


© 1997-2000 Microsoft Corporation. All rights reserved.