共用方式為


Index.CheckIndexWithResult 方法

Tests the integrity of database pages that store the index.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Function CheckIndexWithResult As DataTable
'用途
Dim instance As Index 
Dim returnValue As DataTable 

returnValue = instance.CheckIndexWithResult()
public DataTable CheckIndexWithResult()
public:
DataTable^ CheckIndexWithResult()
member CheckIndexWithResult : unit -> DataTable
public function CheckIndexWithResult() : DataTable

傳回值

型別:System.Data.DataTable
A DataTable object value that contains the error message generated by the integrity check.

備註

The CheckIndex method is implemented using the Transact-SQL DBCC CHECKTABLE WITH TABLERESULTS statement.

[!附註]

Indexes based on the UserDefinedTableType object cannot be checked and running this method will generate an exception.

範例

建立、改變和移除索引

請參閱

參考

Index 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

索引

CREATE INDEX (Transact-SQL)