Export (0) Print
Expand All

AddObject Method

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

The AddObject method appends the database object referenced to the list of those objects copied when the Transfer method of the Database object is used to copy database schema or data.

object.AddObject(DBObject)

object

Expression that evaluates to an object in the Applies To list.

DBObject

Expression that evaluates to a DBObject object.

HRESULT AddObject(LPSQLDMODBOBJECT DBObject);

SQL Distributed Management Objects (SQL-DMO) implements copying of database schema and data by using the Transfer object and methods implemented on the Database object. The Transfer object is used to define which database objects are affected by the copy and how the copy is performed. Use the AddObject and AddObjectByName methods to add database objects to those affected by the copy.

NoteNote

The ListObjects method of the Database object returns a list of DBObject objects. The method can be used to prepare a list for use by the AddObject method.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft