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

AF SDK Reference

AFDatabases.Add Method (String)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFDatabases.Add Method (String)
Adds a new database to the list of known databases on the local machine.

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

Syntax

public AFDatabase Add(
	string name
)
Public Function Add ( 
	name As String
) As AFDatabase

Dim instance As AFDatabases
Dim name As String
Dim returnValue As AFDatabase

returnValue = instance.Add(name)
public:
AFDatabase^ Add(
	String^ name
)
member Add : 
        name : string -> AFDatabase 

Parameters

name
Type: SystemString
The name of the new database. This name must be unique from all other database names on the PISystem. If the name ends with an asterisk (*), then a unique name will be generated based on the supplied name. See the ValidateName(String, String) method for a description of what is valid when setting the name of the object.

Return Value

Type: AFDatabase
The newly added AFDatabase.

Remarks

This method is used to add an entry to the list of known databases on the local machine and specify its initial configuration. All the configuration information except the localDatabaseName can be modified through properties of the AFDatabase object.

Version Information

AFSDK


See Also

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