RebuildIndex Method (SQL-DMO)

The RebuildIndex method re-creates an index implementing a Microsoft® SQL Server™ PRIMARY KEY or UNIQUE key constraint.

Applies To

Key Object

Syntax

object.RebuildIndex( )

Part Description
object Expression that evaluates to an object in the Applies To list

Remarks

Use the RebuildIndex method when the Type property of the Key object returns SQLDMOKey_Primary or SQLDMOKey_Unique, and the object references an existing table key.

Set the FillFactor property of the Key object prior to calling the method to alter key-maintaining index density. For more information about index fill factor, see CREATE INDEX.

Prototype (C/C++)

HRESULT RebuildIndex();

See Also

FillFactor Property

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.