共用方式為


Publication.EnumArticles 方法

Returns the articles in the publication.

命名空間:  Microsoft.SqlServer.Replication
組件:  Microsoft.SqlServer.Rmo (在 Microsoft.SqlServer.Rmo.dll 中)

語法

'宣告
Public Function EnumArticles As ArrayList
'用途
Dim instance As Publication 
Dim returnValue As ArrayList 

returnValue = instance.EnumArticles()
public ArrayList EnumArticles()
public:
ArrayList^ EnumArticles()
member EnumArticles : unit -> ArrayList
public function EnumArticles() : ArrayList

傳回值

型別:System.Collections.ArrayList
An ArrayList of TransArticle or MergeArticle objects.

例外狀況

例外狀況 條件
ApplicationException

If the publication does not exist on the server.

備註

If the publication is a merge publication, the ArrayList contains MergeArticle objects. If the publication is a transactional or snapshot publication, the ArrayList contains TransArticle objects.

The EnumArticles method can only be called by members of the sysadmin fixed server role, by members of the db_owner fixed database role, or users in the publication access list (PAL) for the publication

Calling EnumArticles is equivalent to executing sp_helparticle (Transact-SQL) or sp_helpmergearticle (Transact-SQL).

請參閱

參考

Publication 類別

Microsoft.SqlServer.Replication 命名空間