Share via


ContentListSchema Object

Ee810021.c++_off(en-US,CS.10).gifEe810021.vb_on(en-US,CS.10).gif

Use this object to manipulate the schema for a ContentListFactory object.

ProgID:   Commerce.ContentListSchema (Externally creatable)
COM Class Name:   ContentListSchema
COM Interface Name:   IContentListSchema
Interface ID Constant:   IID_IContentListSchema
Header File:   cacheint.h, mspu_guids.h
Type Library Name:   Microsoft Commerce 2000 Cache Manager Type Library
DLL Name:   mscscache.dll
Threading Model:   Both

The properties of the ContentListSchema object are shown in the following table.

Property Type Description
ColumnFlags long Stores the column flags, represented as a bit field.

This property is read/write.

ColumnName BSTR Stores the column name.

This property is read/write.

ColumnType ColumnTypeEnum Stores the data type of the column.

This property is read/write.

Count long Stores the number of columns defined by the schema.

This property is read-only.

Locked VARIANT_BOOL Indicates whether this schema can be modified.

This property is read/write. It is initially set to False. Once set to True, it can never be set back to False.

The methods of the ContentListSchema object are shown in the following table.

Method Description
Add Adds a new column to the schema.
FindColumn Returns the position of a named column. Column positions are counted starting from zero (0), not one (1). This position index may be used as the Column index parameter for the GetData, SetData, Filter, and Search methods of the IContentList interface.
GetSchema Returns the entire schema in a high-performance, non-scriptable manner.
SetSchema Sets the entire schema in a high-performance, non-scriptable manner.

Remarks

The methods GetSchema and SetSchema are only accessible from C++. Respectively, they get and set the entire schema associated with a ContentListSchema object. They pass the schema as an array of CLCOL_DESCRIPTOR structures, where each element in the array represents a corresponding column in the schema, in the same order that they appear in the array.

The definition of a CLCOL_DESCRIPTOR structure is as follows:

typedef struct
{
  ColumnTypeEnum  coltyp;    // column type
  ULONG           lFlags;    // column flags, represented as a bit field
  ULONG           cchName;   // length of column name
  WCHAR*          pwszName;  // column name
} CLCOL_DESCRIPTOR;

The members of the CLCOL_DESCRIPTOR structure are described in the following table.

Structure Member Description
coltyp Contains a value indicating the data type associated with the column. This value should be from the set of values present in the ColumnTypeEnum enumeration. For more information about this enumeration, see the Remarks section of IContentListSchema::get_ColumnType, put_ColumnType
lFlags Contains a value indicating the column flags associated with the column, represented as a bit field.
cchName Contains a value indicating the length of the column name string, in characters.
pwszName Contains a pointer to a NULL-terminated string containing the name of the column.


All rights reserved.