CatalogManager.SetPropertyAttributes
Use this method to change the attributes of a property.
Definition
Sub SetPropertyAttributes(pRSNewState As _Recordset,Optional fForceUpdate As Variant)
Parameters
pRSNewState
A _Recordset object that specifies the new attribute values.
fForceUpdate
A Variant that specifies whether or not to force an update.
Return Values
None.
Error Values
This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.
The following table shows the custom COM errors that this method can return.
Constant | Value | Description |
E_CAT_PROP_CHANGED | &H88980006 | The attributes of the property have changed since the property was last read. This error occurs when the sForceUpdate parameter is False, and the attributes were modified after a call to the CreateProperty or GetPropertyAttributes methods. |
E_CAT_PROP_DOESNT_EXIST | &H88980005 | There was no property with the name you specified. |
Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
Remarks
Use a Recordset object returned from either the GetPropertyAttributes method or the CreateProperty method as the pRSNewState parameter so that its timestamp can be compared with the timestamp of the existing property for error detection. You can change all attributes for a property except its data type.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
Example
myCatalogManager.SetPropertyAttributes pRSNewState, TRUE