AFDatabase.CheckIn Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
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 Type | Reason |
|---|---|
| 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.