Accessing Repository Objects
Access to repository objects is supported at both the COM and Automation level, as shown in the following table.
To | Use |
---|---|
Create an object | The CreateObject method of the IRepository interface. |
Retrieve an object | The Object property of the IRepository interface. |
Delete an object | The Delete method of the IRepositoryItem interface. |
Obtain the value of an early-bound object property | (Automation) The syntax variable = object.property, as for any Automation object property.
(COM) The get_PropertyName method of the COM interface to which the property is attached, where PropertyName is the name of the property to be retrieved. You can also use the late-bound property access method. |
Obtain the value of a late-bound object property (that is, the object class is not in an available type library) | (Automation) The syntax variable = object.property, as for any Automation object property.
(COM) The standard Automation method-invocation technique to invoke the get_PropertyName method, where PropertyName is the name of the property to be retrieved. Because all Microsoft® SQL Server™ 2000 Meta Data Services interfaces that expose late-bound properties are indirectly derived from the IDispatch interface, the GetIDsOfNames and Invoke methods are available for use. |
Set the value of an early-bound object property | (Automation) The syntax object.property = value, as for any Automation object property.
(COM) The put_PropertyName method of the COM interface to which the property is attached, where PropertyName is the name of the property to be set. You can also use the late-bound property access method. |
Set the value of a late-bound object property (that is, the object class is not in an available type library) | (Automation) The syntax object.property = value, as for any Automation object property.
(COM) The standard Automation method-invocation technique to invoke the put_PropertyName method, where PropertyName is the name of the property to be set. Because all Meta Data Services interfaces that expose late-bound properties are indirectly derived from the IDispatch interface, the GetIDsOfNames and Invoke methods are available for use. |
Retrieve the object identifier of an object | The ObjectID property of the IRepositoryObject interface. |
Retrieve the version identifier of an object | The VersionID property of the IRepositoryVersion interface. |
Set the object identifier of an object | The object identifier, which is passed as a parameter when creating the object. |
Retrieve the internal identifier of an object | The InternalID property of the IRepositoryObject interface. |