AFDatabase.Refresh Method (Boolean)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Refreshes the client with any changes that have been made to the database since loaded
with an option to discard unapplied changes.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void Refresh( bool discardUnappliedChanges )
Public Sub Refresh ( discardUnappliedChanges As Boolean ) Dim instance As AFDatabase Dim discardUnappliedChanges As Boolean instance.Refresh(discardUnappliedChanges)
public: void Refresh( bool discardUnappliedChanges )
member Refresh : discardUnappliedChanges : bool -> unit
Parameters
- discardUnappliedChanges
- Type: SystemBoolean
If , then any changes made to the database which have not been applied will be lost.
Events
| Event Type | Reason |
|---|---|
| AFDatabaseChanged | This event will be raised for each change detected that was made by another application that is external to the current instance of the SDK. |
Remarks
Any objects within the database that were previously loaded will be updated with any
changes that have been saved to the server. If discardUnappliedChanges
is and an object has unapplied changes, then it
will not be updated since it cannot be determined which change is newer.
Examples
See Event Example
for an example of using this method to generate events when a change has been made to
the database by an external application.