Export (0) Print
Expand All

SQL-DMO Object Tree

SQL Server 2000

SQL-DMO objects are exposed as properties of other SQL-DMO objects. The relationship provides developers with a logical, tree-like structure for SQL-DMO that simplifies programming with automation controllers. Many objects can be referenced using the familiar dot notation used to reference properties or methods.

For example, the Database object exposes a Tables collection. Each Table object within the collection represents a single table of an instance of Microsoft® SQL Server™. Obtaining a SQL-DMO Table object referencing a specific table can be done with the following syntax:

Set oTable = oDatabase.Tables("Employees")

The SQLServer object forms the trunk of the SQL-DMO object tree. Three main branches are visible in the tree:

  • Objects implemented as properties of the Database object implement SQL Server database construction and maintenance tasks.

  • Objects implemented as properties of the JobServer object implement SQL Server Agent job, operator, and alert administration.

  • Objects implemented as properties of the Replication object implement transactional, snapshot, and merge replication publication and subscription construction and maintenance.

© 2015 Microsoft