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

AF SDK Reference

AFDatabase.CheckIn Method

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFDatabase.CheckIn Method
This method checks in (commits) all the changes to all objects modified by the current user in the database by saving all information to persistent storage.

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

Syntax

public void CheckIn()
Public Sub CheckIn

Dim instance As AFDatabase

instance.CheckIn()
public:
void CheckIn()
member CheckIn : 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 CheckIn(AFCheckedOutMode) with ObjectsCheckedOutToMe specified as the parameter.

Before an object's configuration can be modified, it must be locked by checking it out for modifications by calling the CheckOut method of the object. After making changes, the modifications are saved permanently by calling this method or the CheckIn method of the object. Alternatively, modifications can be stored into the database temporarily for this user by calling either the ApplyChanges(AFCheckedOutMode) or the ApplyChanges method of the object. Changes to objects are not persisted to the database until they are either Applied or CheckedIn. All changes to the database by the current user can also be undone by calling the UndoCheckOut(Boolean) method.

Care should be taken to limit the amount of changes checked in 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.

When checking in a large number of items and an error occurs during the check in, some objects may have been successfully checked in without the SDK knowing. When this occurs you will get an error that the object is not checked out on the next check in attempt. If this occurs, you can call AFDatabaseRefresh to update the SDK's list of successfully checked in objects.

Examples

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

Version Information

AFSDK


See Also

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