Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFDatabase.ApplyChanges Method

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFDatabase.ApplyChanges Method
This method applies (saves) all the changes to objects modified by the current user in the database and makes those changes available to other applications executing under the same user account.

Namespace:  OSIsoft.AF
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public void ApplyChanges()
Public Sub ApplyChanges

Dim instance As AFDatabase

instance.ApplyChanges()
public:
void ApplyChanges()
member ApplyChanges : unit -> unit 

Events

Event TypeReason
AFDatabaseChanged This event will be raised for each object updated by this method call.

Remarks

This is the same as calling ApplyChanges(AFCheckedOutMode) with ObjectsCheckedOutToMe specified as the parameter.

This method will apply the changes made to all modified objects so that those changes become available to other applications executing under the same user account. This method will not check in those changes. However, once this method has been called, the changes will be available for check in on subsequent invocations of the application for the currently logged in user. This method is useful when making changes to element templates to allow the changes to be realized in the elements derived from the template. A call to this method is not required before calling AFDatabaseCheckIn.

Care should be taken to limit the amount of applied at one time to reasonable amounts. While it is possible to make a significant number of changes at one time, these changes are transferred to the PI AF Server at one time and can thus require significant amounts of memory to complete the operation.

Examples

For an example of various methods of using ApplyChanges and CheckIn, see the CheckIn Example.

Version Information

AFSDK


See Also

In This Topic
TitleResults for “How to create a CRG?”Also Available in