共用方式為


Database.FullTextCatalogs 屬性

Gets a collection of FullTextCatalog objects. Each FullTextCatalog object represents a full-text catalog defined on the database.

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

語法

'宣告
<SfcObjectAttribute(SfcContainerRelationship.ChildContainer, SfcContainerCardinality.ZeroToAny,  _
    GetType(FullTextCatalog))> _
Public ReadOnly Property FullTextCatalogs As FullTextCatalogCollection 
    Get
'用途
Dim instance As Database 
Dim value As FullTextCatalogCollection 

value = instance.FullTextCatalogs
[SfcObjectAttribute(SfcContainerRelationship.ChildContainer, SfcContainerCardinality.ZeroToAny, 
    typeof(FullTextCatalog))]
public FullTextCatalogCollection FullTextCatalogs { get; }
[SfcObjectAttribute(SfcContainerRelationship::ChildContainer, SfcContainerCardinality::ZeroToAny, 
    typeof(FullTextCatalog))]
public:
property FullTextCatalogCollection^ FullTextCatalogs {
    FullTextCatalogCollection^ get ();
}
[<SfcObjectAttribute(SfcContainerRelationship.ChildContainer, SfcContainerCardinality.ZeroToAny, 
    typeof(FullTextCatalog))>]
member FullTextCatalogs : FullTextCatalogCollection
function get FullTextCatalogs () : FullTextCatalogCollection

屬性值

型別:Microsoft.SqlServer.Management.Smo.FullTextCatalogCollection
A FullTextCatalogCollection object that represents all the full-text catalogs defined on the database.

備註

Specific full-text catalogs can be referenced by using this collection by specifying the name of the full-text catalog. To add a new full-text catalog to the collection, call the full-text catalog constructor.

範例

VB

'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server

'Reference the AdventureWorks2012 database.
Dim db As Database
db = srv.Databases("AdventureWorks2012")

'Display all the full-text catalogs in the database.
Dim ftc As FullTextCatalog
For Each ftc In db.FullTextCatalogs
   Console.WriteLine(ftc.Name)
Next

PowerShell

$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2012")

Foreach ($ftc in $db.FullTextCatalogs)
{
   Write-Host $ftc.Name
}

請參閱

參考

Database 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

使用資料庫物件

實作全文檢索搜尋

建立、改變和移除資料庫

CREATE DATABASE (Transact-SQL)