Add Method (SQL-DMO)

The Add method appends the object specified to an appropriate SQL-DMO collection.

Applies To
AlertCategories Collection MergeArticles Collection
Alerts Collection MergePublications Collection
BackupDevices Collection MergePullSubscriptions Collection
Checks Collection MergeSubscriptions Collection
Columns Collection MergeSubsetFilters Collection
DatabaseRoles Collection Names Collection
Databases Collection OperatorCategories Collection
DBFiles Collection Operators Collection
Defaults Collection RegisteredServers Collection
DistributionArticles Collection RegisteredSubscribers Collection
DistributionDatabases Collection RemoteLogins Collection
DistributionPublications Collection RemoteServers Collection
DistributionPublishers Collection Rules Collection
DistributionSubscriptions Collection ServerGroups Collection
FileGroups Collection StoredProcedures Collection
FullTextCatalogs Collection Tables Collection
Indexes Collection TargetServerGroups Collection
JobCategories Collection TransArticles Collection
Jobs Collection TransPublications Collection
JobSchedules Collection TransPullSubscriptions Collection
JobSteps Collection TransSubscriptions Collection
Keys Collection Triggers Collection
LinkedServerLogins Collection UserDefinedDatatypes Collection
LinkedServers Collection Users Collection
LogFiles Collection Views Collection
Logins Collection  

Syntax

object.Add( ObjectToAdd )

Part Description
object Expression that evaluates to an object in the Applies To list
ObjectToAdd Expression that evaluates to an object of the type contained by the collection

Remarks

For any collection exposing the Add method, the method implements Microsoft® SQL Server™ component creation. Component creation can occur as the SQL-DMO object is added to its containing collection, or at some other application-directed time.

For more information about component creation by using the Add method of the SQL-DMO collection, see documentation for SQL-DMO objects and collections.

Prototype (C/C++)

HRESULT Add(LPSQLDMOobject pObject);

  


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