Sets a property of an OLE object to a new value.
sp_OASetProperty objecttoken,
propertyname,
newvalue
[, index...]
Some properties have parameters. These properties are called indexed properties, and the parameters are called index parameters. A property can have multiple index parameters.
Note The parameters for this stored procedure are specified by position, not name.
0 (success) or a nonzero number (failure) that is the integer value of the HRESULT returned by the OLE Automation object.
For more information about HRESULT Return Codes, see OLE Automation Return Codes and Error Information.
None
This example sets the HostName property (of the previously created SQLServer object) to a new value.
EXEC @hr = sp_OASetProperty @object, 'HostName', 'Gizmo'
IF @hr <> 0
BEGIN
EXEC sp_displayoaerrorinfo @object, @hr
RETURN
END