SetEffectiveDate Method (IPIVersion object)


Method for modifying the EffectiveDate.



object.SetEffectiveDate varDate

The SetEffectiveDate method syntax has these parts:




An object expression that evaluates to a IPIVersion object.


A VARIANT representing the time the owner object came into existence. The VARIANT may be a PITime, DATE, String, or numeric. Interpretation of DATE, strings and numerics is consistent with PITime's interpretation.



Changing the EffectiveDate has the same effect as using the Copy method to create a new value at the new EffectiveDate and then using the RemoveValue method to remove the old value. The difference is that this method is a single transaction on the server. The RevisionNumber is reset to 1 upon completion of this action.


The IPIVersion interface may be supported by any PI-SDK object. Currently, only PIModule supports this interface.


Trappable Errors

In addition to generic errors (such as Out of Memory), the following error may occur:




There was an error changing the EffectiveDate. Either the user didn't have permission or there was all ready a value on the server with the new effective date.


Enabling Operational Intelligence